home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Tele / Internet / NewsWatch.sit / source / netstuff.c < prev    next >
MacBinary  |  1991-04-03  |  15.0 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: netstuff.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Wed Apr 3 18:30:14 1991, modified Wed Apr 3 18:30:14 1991, creator 'MPS ', type ASCII, 14352 bytes "netstuff.c" , at 0x3890 674 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 6e 65 74 73 74 75 | 66 66 2e 63 00 00 00 00 |..netstu|ff.c....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 38 10 00 | 00 02 a2 a4 20 16 06 a4 |.....8..|.... ...|
|00000060| 20 16 06 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 90 db 00 00 |........|........|
|00000080| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0d 23 0d 23 |--------|----.#.#|
|000000c0| 09 4e 65 77 73 57 61 74 | 63 68 65 72 09 2d 20 4d |.NewsWat|cher.- M|
|000000d0| 61 63 69 6e 74 6f 73 68 | 20 4e 4e 54 50 20 43 6c |acintosh| NNTP Cl|
|000000e0| 69 65 6e 74 20 41 70 70 | 6c 69 63 61 74 69 6f 6e |ient App|lication|
|000000f0| 0d 23 0d 23 09 57 72 69 | 74 74 65 6e 20 62 79 20 |.#.#.Wri|tten by |
|00000100| 53 74 65 76 65 6e 20 46 | 61 6c 6b 65 6e 62 75 72 |Steven F|alkenbur|
|00000110| 67 0d 23 09 a9 31 39 39 | 30 20 41 70 70 6c 65 20 |g.#..199|0 Apple |
|00000120| 43 6f 6d 70 75 74 65 72 | 2c 20 49 6e 63 2e 0d 23 |Computer|, Inc..#|
|00000130| 0d 23 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.#------|--------|
|00000140| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000150| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000160| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0d 23 0d |--------|-----.#.|
|00000170| 23 09 6e 65 74 73 74 75 | 66 66 2e 63 0d 23 0d 23 |#.netstu|ff.c.#.#|
|00000180| 09 54 68 65 20 6e 65 74 | 73 74 75 66 66 20 63 6f |.The net|stuff co|
|00000190| 64 65 20 6d 6f 64 75 6c | 65 20 63 6f 6e 74 61 69 |de modul|e contai|
|000001a0| 6e 73 20 73 65 76 65 72 | 61 6c 20 72 6f 75 74 69 |ns sever|al routi|
|000001b0| 6e 65 73 20 77 68 69 63 | 68 0d 23 09 68 61 6e 64 |nes whic|h.#.hand|
|000001c0| 6c 65 20 6e 65 74 77 6f | 72 6b 20 73 70 65 63 69 |le netwo|rk speci|
|000001d0| 66 69 63 20 74 61 73 6b | 73 20 6f 66 20 74 68 65 |fic task|s of the|
|000001e0| 20 70 72 6f 67 72 61 6d | 2e 20 20 41 6d 6f 6e 67 | program|. Among|
|000001f0| 0d 23 09 74 68 65 73 65 | 20 61 72 65 20 75 73 65 |.#.these| are use|
|00000200| 72 20 61 75 74 68 65 6e | 74 69 63 61 74 69 6f 6e |r authen|tication|
|00000210| 2c 20 61 6e 64 20 68 69 | 67 68 2d 6c 65 76 65 6c |, and hi|gh-level|
|00000220| 20 66 69 6c 65 20 78 66 | 65 72 0d 23 09 63 61 6c | file xf|er.#.cal|
|00000230| 6c 73 2e 0d 23 0d 23 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ls..#.#-|--------|
|00000240| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000250| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000260| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000270| 2d 2d 2a 2f 0d 0d 23 70 | 72 61 67 6d 61 20 73 65 |--*/..#p|ragma se|
|00000280| 67 6d 65 6e 74 20 6e 65 | 74 73 74 75 66 66 0d 0d |gment ne|tstuff..|
|00000290| 23 69 6e 63 6c 75 64 65 | 20 22 63 6f 6d 70 61 74 |#include| "compat|
|000002a0| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 3c 53 74 |.h".#inc|lude <St|
|000002b0| 72 69 6e 67 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |ring.h>.|#include|
|000002c0| 20 3c 53 74 64 49 4f 2e | 68 3e 0d 0d 23 69 66 64 | <StdIO.|h>..#ifd|
|000002d0| 65 66 20 50 52 4f 54 4f | 53 0d 23 69 6e 63 6c 75 |ef PROTO|S.#inclu|
|000002e0| 64 65 20 3c 54 79 70 65 | 73 2e 68 3e 0d 23 69 6e |de <Type|s.h>.#in|
|000002f0| 63 6c 75 64 65 20 3c 54 | 65 78 74 45 64 69 74 2e |clude <T|extEdit.|
|00000300| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 44 69 61 |h>.#incl|ude <Dia|
|00000310| 6c 6f 67 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |logs.h>.|#include|
|00000320| 20 3c 46 69 6c 65 73 2e | 68 3e 0d 23 69 6e 63 6c | <Files.|h>.#incl|
|00000330| 75 64 65 20 3c 4d 65 6d | 6f 72 79 2e 68 3e 0d 23 |ude <Mem|ory.h>.#|
|00000340| 69 6e 63 6c 75 64 65 20 | 3c 45 72 72 6f 72 73 2e |include |<Errors.|
|00000350| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 45 76 65 |h>.#incl|ude <Eve|
|00000360| 6e 74 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |nts.h>.#|include |
|00000370| 3c 46 6f 6e 74 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |<Fonts.h|>.#inclu|
|00000380| 64 65 20 3c 50 61 63 6b | 61 67 65 73 2e 68 3e 0d |de <Pack|ages.h>.|
|00000390| 23 69 6e 63 6c 75 64 65 | 20 3c 4c 69 73 74 73 2e |#include| <Lists.|
|000003a0| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 54 6f 6f |h>.#incl|ude <Too|
|000003b0| 6c 55 74 69 6c 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |lUtils.h|>.#inclu|
|000003c0| 64 65 20 3c 53 74 72 69 | 6e 67 73 2e 68 3e 0d 23 |de <Stri|ngs.h>.#|
|000003d0| 65 6e 64 69 66 0d 0d 23 | 69 6e 63 6c 75 64 65 20 |endif..#|include |
|000003e0| 22 4d 61 63 54 43 50 43 | 6f 6d 6d 6f 6e 54 79 70 |"MacTCPC|ommonTyp|
|000003f0| 65 73 2e 68 22 0d 23 69 | 6e 63 6c 75 64 65 20 22 |es.h".#i|nclude "|
|00000400| 41 64 64 72 65 73 73 58 | 4c 61 74 69 6f 6e 2e 68 |AddressX|Lation.h|
|00000410| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 54 43 50 50 |".#inclu|de "TCPP|
|00000420| 42 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 6e |B.h".#in|clude "n|
|00000430| 6e 74 70 2e 68 22 0d 23 | 69 6e 63 6c 75 64 65 20 |ntp.h".#|include |
|00000440| 22 6e 65 74 73 74 75 66 | 66 2e 68 22 0d 23 69 6e |"netstuf|f.h".#in|
|00000450| 63 6c 75 64 65 20 22 6d | 69 73 63 73 74 75 66 66 |clude "m|iscstuff|
|00000460| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 22 75 73 |.h".#inc|lude "us|
|00000470| 65 72 69 6e 74 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |erint.h"|.#includ|
|00000480| 65 20 22 6e 65 77 73 70 | 72 6f 63 65 73 73 2e 68 |e "newsp|rocess.h|
|00000490| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 54 43 50 48 |".#inclu|de "TCPH|
|000004a0| 69 2e 68 22 0d 23 69 6e | 63 6c 75 64 65 20 22 46 |i.h".#in|clude "F|
|000004b0| 54 50 4c 6f 77 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |TPLow.h"|.#includ|
|000004c0| 65 20 22 4e 4e 54 50 4c | 6f 77 2e 68 22 0d 23 69 |e "NNTPL|ow.h".#i|
|000004d0| 6e 63 6c 75 64 65 20 22 | 53 4d 54 50 4c 6f 77 2e |nclude "|SMTPLow.|
|000004e0| 68 22 0d 0d 73 74 61 74 | 69 63 20 63 68 61 72 20 |h"..stat|ic char |
|000004f0| 67 50 77 53 74 72 5b 32 | 35 36 5d 3b 09 09 2f 2a |gPwStr[2|56];../*|
|00000500| 20 74 68 65 20 75 73 65 | 72 27 73 20 70 61 73 73 | the use|r's pass|
|00000510| 77 6f 72 64 20 2a 2f 0d | 75 6e 73 69 67 6e 65 64 |word */.|unsigned|
|00000520| 20 6c 6f 6e 67 20 67 53 | 4d 54 50 41 64 64 72 65 | long gS|MTPAddre|
|00000530| 73 73 3b 09 09 2f 2a 20 | 74 68 65 20 69 70 20 61 |ss;../* |the ip a|
|00000540| 64 64 72 65 73 73 20 6f | 66 20 74 68 65 20 53 4d |ddress o|f the SM|
|00000550| 54 50 20 68 6f 73 74 20 | 2a 2f 0d 0d 2f 2a 20 6c |TP host |*/../* l|
|00000560| 6f 63 61 6c 20 70 72 6f | 74 6f 73 20 2a 2f 0d 0d |ocal pro|tos */..|
|00000570| 70 61 73 63 61 6c 20 42 | 6f 6f 6c 65 61 6e 20 50 |pascal B|oolean P|
|00000580| 61 73 73 77 6f 72 64 46 | 69 6c 74 65 72 28 44 69 |asswordF|ilter(Di|
|00000590| 61 6c 6f 67 50 74 72 20 | 74 68 65 44 69 61 6c 6f |alogPtr |theDialo|
|000005a0| 67 2c 45 76 65 6e 74 52 | 65 63 6f 72 64 20 2a 74 |g,EventR|ecord *t|
|000005b0| 68 65 45 76 65 6e 74 2c | 73 68 6f 72 74 20 2a 69 |heEvent,|short *i|
|000005c0| 74 65 6d 48 69 74 29 3b | 0d 70 61 73 63 61 6c 20 |temHit);|.pascal |
|000005d0| 76 6f 69 64 20 44 4e 52 | 52 65 73 75 6c 74 50 72 |void DNR|ResultPr|
|000005e0| 6f 63 28 73 74 72 75 63 | 74 20 68 6f 73 74 49 6e |oc(struc|t hostIn|
|000005f0| 66 6f 20 2a 68 49 6e 66 | 6f 50 74 72 2c 63 68 61 |fo *hInf|oPtr,cha|
|00000600| 72 20 2a 75 73 65 72 44 | 61 74 61 50 74 72 29 3b |r *userD|ataPtr);|
|00000610| 0d 0d 0d 2f 2a 09 43 68 | 61 6e 67 65 53 65 72 76 |.../*.Ch|angeServ|
|00000620| 65 72 41 64 64 72 65 73 | 73 20 69 73 20 63 61 6c |erAddres|s is cal|
|00000630| 6c 65 64 20 74 6f 20 67 | 65 74 20 61 20 6e 65 77 |led to g|et a new|
|00000640| 20 6e 61 6d 65 2f 61 64 | 64 72 65 73 73 20 66 6f | name/ad|dress fo|
|00000650| 72 20 74 68 65 20 6e 65 | 77 73 0d 09 6f 72 20 6d |r the ne|ws..or m|
|00000660| 61 69 6e 20 73 65 72 76 | 65 72 2e 20 20 54 68 65 |ain serv|er. The|
|00000670| 20 6e 65 77 20 61 64 64 | 72 65 73 73 20 77 69 6c | new add|ress wil|
|00000680| 6c 20 62 65 20 73 74 6f | 72 65 64 20 69 6e 20 74 |l be sto|red in t|
|00000690| 68 65 20 70 72 65 66 73 | 20 66 69 6c 65 2e 0d 2a |he prefs| file..*|
|000006a0| 2f 0d 0d 76 6f 69 64 20 | 43 68 61 6e 67 65 53 65 |/..void |ChangeSe|
|000006b0| 72 76 65 72 41 64 64 72 | 65 73 73 28 42 6f 6f 6c |rverAddr|ess(Bool|
|000006c0| 65 61 6e 20 66 6f 72 4e | 65 77 73 29 0d 7b 0d 09 |ean forN|ews).{..|
|000006d0| 44 69 61 6c 6f 67 50 74 | 72 20 74 68 65 44 6c 67 |DialogPt|r theDlg|
|000006e0| 3b 0d 09 73 68 6f 72 74 | 20 69 54 79 70 65 3b 0d |;..short| iType;.|
|000006f0| 09 48 61 6e 64 6c 65 20 | 69 48 6e 64 6c 3b 0d 09 |.Handle |iHndl;..|
|00000700| 52 65 63 74 20 69 42 6f | 78 3b 0d 09 53 74 72 32 |Rect iBo|x;..Str2|
|00000710| 35 35 20 73 65 72 76 65 | 72 4e 61 6d 65 3b 0d 09 |55 serve|rName;..|
|00000720| 73 68 6f 72 74 20 69 74 | 65 6d 3b 0d 09 65 78 74 |short it|em;..ext|
|00000730| 65 72 6e 20 42 6f 6f 6c | 65 61 6e 20 67 44 6f 6e |ern Bool|ean gDon|
|00000740| 65 3b 0d 09 65 78 74 65 | 72 6e 20 54 50 72 65 66 |e;..exte|rn TPref|
|00000750| 52 65 63 20 67 50 72 65 | 66 73 3b 0d 09 0d 09 69 |Rec gPre|fs;....i|
|00000760| 66 20 28 66 6f 72 4e 65 | 77 73 29 20 7b 0d 09 09 |f (forNe|ws) {...|
|00000770| 69 66 20 28 67 50 72 65 | 66 73 2e 6e 65 77 73 53 |if (gPre|fs.newsS|
|00000780| 65 72 76 65 72 4e 61 6d | 65 5b 30 5d 20 3d 3d 20 |erverNam|e[0] == |
|00000790| 27 5c 30 27 29 20 7b 0d | 09 09 09 53 79 73 42 65 |'\0') {.|...SysBe|
|000007a0| 65 70 28 31 29 3b 0d 09 | 09 09 42 6c 6f 63 6b 4d |ep(1);..|..BlockM|
|000007b0| 6f 76 65 28 6b 4e 4e 54 | 50 4e 61 6d 65 2c 73 65 |ove(kNNT|PName,se|
|000007c0| 72 76 65 72 4e 61 6d 65 | 2c 6b 4e 4e 54 50 4e 61 |rverName|,kNNTPNa|
|000007d0| 6d 65 4c 65 6e 29 3b 0d | 09 09 7d 0d 09 09 65 6c |meLen);.|..}...el|
|000007e0| 73 65 0d 09 09 09 42 6c | 6f 63 6b 4d 6f 76 65 28 |se....Bl|ockMove(|
|000007f0| 67 50 72 65 66 73 2e 6e | 65 77 73 53 65 72 76 65 |gPrefs.n|ewsServe|
|00000800| 72 4e 61 6d 65 2c 73 65 | 72 76 65 72 4e 61 6d 65 |rName,se|rverName|
|00000810| 2c 28 67 50 72 65 66 73 | 2e 6e 65 77 73 53 65 72 |,(gPrefs|.newsSer|
|00000820| 76 65 72 4e 61 6d 65 29 | 5b 30 5d 2b 31 29 3b 0d |verName)|[0]+1);.|
|00000830| 09 09 74 68 65 44 6c 67 | 20 3d 20 47 65 74 4e 65 |..theDlg| = GetNe|
|00000840| 77 44 69 61 6c 6f 67 28 | 6b 4e 65 77 73 53 65 72 |wDialog(|kNewsSer|
|00000850| 76 65 72 41 64 64 72 49 | 44 2c 6e 69 6c 2c 28 57 |verAddrI|D,nil,(W|
|00000860| 69 6e 64 6f 77 50 74 72 | 29 2d 31 29 3b 0d 09 7d |indowPtr|)-1);..}|
|00000870| 0d 09 65 6c 73 65 20 7b | 0d 09 09 69 66 20 28 67 |..else {|...if (g|
|00000880| 50 72 65 66 73 2e 6d 61 | 69 6c 53 65 72 76 65 72 |Prefs.ma|ilServer|
|00000890| 4e 61 6d 65 5b 30 5d 20 | 3d 3d 20 27 5c 30 27 29 |Name[0] |== '\0')|
|000008a0| 20 7b 0d 09 09 09 53 79 | 73 42 65 65 70 28 31 29 | {....Sy|sBeep(1)|
|000008b0| 3b 0d 09 09 09 42 6c 6f | 63 6b 4d 6f 76 65 28 6b |;....Blo|ckMove(k|
|000008c0| 53 4d 54 50 4e 61 6d 65 | 2c 73 65 72 76 65 72 4e |SMTPName|,serverN|
|000008d0| 61 6d 65 2c 6b 53 4d 54 | 50 4e 61 6d 65 4c 65 6e |ame,kSMT|PNameLen|
|000008e0| 29 3b 0d 09 09 7d 0d 09 | 09 65 6c 73 65 0d 09 09 |);...}..|.else...|
|000008f0| 09 42 6c 6f 63 6b 4d 6f | 76 65 28 67 50 72 65 66 |.BlockMo|ve(gPref|
|00000900| 73 2e 6d 61 69 6c 53 65 | 72 76 65 72 4e 61 6d 65 |s.mailSe|rverName|
|00000910| 2c 73 65 72 76 65 72 4e | 61 6d 65 2c 28 67 50 72 |,serverN|ame,(gPr|
|00000920| 65 66 73 2e 6d 61 69 6c | 53 65 72 76 65 72 4e 61 |efs.mail|ServerNa|
|00000930| 6d 65 29 5b 30 5d 2b 31 | 29 3b 0d 09 09 74 68 65 |me)[0]+1|);...the|
|00000940| 44 6c 67 20 3d 20 47 65 | 74 4e 65 77 44 69 61 6c |Dlg = Ge|tNewDial|
|00000950| 6f 67 28 6b 4d 61 69 6c | 53 65 72 76 65 72 41 64 |og(kMail|ServerAd|
|00000960| 64 72 49 44 2c 6e 69 6c | 2c 28 57 69 6e 64 6f 77 |drID,nil|,(Window|
|00000970| 50 74 72 29 2d 31 29 3b | 0d 09 7d 0d 09 0d 09 4f |Ptr)-1);|..}....O|
|00000980| 75 74 6c 69 6e 65 4f 4b | 28 74 68 65 44 6c 67 29 |utlineOK|(theDlg)|
|00000990| 3b 0d 09 47 65 74 44 49 | 74 65 6d 28 74 68 65 44 |;..GetDI|tem(theD|
|000009a0| 6c 67 2c 33 2c 26 69 54 | 79 70 65 2c 26 69 48 6e |lg,3,&iT|ype,&iHn|
|000009b0| 64 6c 2c 26 69 42 6f 78 | 29 3b 0d 09 53 65 74 49 |dl,&iBox|);..SetI|
|000009c0| 54 65 78 74 28 69 48 6e | 64 6c 2c 73 65 72 76 65 |Text(iHn|dl,serve|
|000009d0| 72 4e 61 6d 65 29 3b 0d | 09 53 65 6c 49 54 65 78 |rName);.|.SelITex|
|000009e0| 74 28 74 68 65 44 6c 67 | 2c 33 2c 30 4c 2c 33 32 |t(theDlg|,3,0L,32|
|000009f0| 37 36 37 4c 29 3b 0d 09 | 64 6f 20 7b 0d 09 09 4d |767L);..|do {...M|
|00000a00| 6f 64 61 6c 44 69 61 6c | 6f 67 28 43 6d 64 4b 65 |odalDial|og(CmdKe|
|00000a10| 79 46 69 6c 74 65 72 2c | 26 69 74 65 6d 29 3b 0d |yFilter,|&item);.|
|00000a20| 09 7d 20 77 68 69 6c 65 | 20 28 69 74 65 6d 21 3d |.} while| (item!=|
|00000a30| 6f 6b 42 75 74 74 6f 6e | 20 26 26 20 69 74 65 6d |okButton| && item|
|00000a40| 21 3d 63 61 6e 63 65 6c | 42 75 74 74 6f 6e 29 3b |!=cancel|Button);|
|00000a50| 0d 09 47 65 74 49 54 65 | 78 74 28 69 48 6e 64 6c |..GetITe|xt(iHndl|
|00000a60| 2c 73 65 72 76 65 72 4e | 61 6d 65 29 3b 0d 09 44 |,serverN|ame);..D|
|00000a70| 69 73 70 6f 73 44 69 61 | 6c 6f 67 28 74 68 65 44 |isposDia|log(theD|
|00000a80| 6c 67 29 3b 0d 09 0d 09 | 69 66 20 28 66 6f 72 4e |lg);....|if (forN|
|00000a90| 65 77 73 29 20 7b 0d 09 | 09 69 66 20 28 69 74 65 |ews) {..|.if (ite|
|00000aa0| 6d 3d 3d 6f 6b 42 75 74 | 74 6f 6e 29 0d 09 09 09 |m==okBut|ton)....|
|00000ab0| 42 6c 6f 63 6b 4d 6f 76 | 65 28 73 65 72 76 65 72 |BlockMov|e(server|
|00000ac0| 4e 61 6d 65 2c 67 50 72 | 65 66 73 2e 6e 65 77 73 |Name,gPr|efs.news|
|00000ad0| 53 65 72 76 65 72 4e 61 | 6d 65 2c 73 65 72 76 65 |ServerNa|me,serve|
|00000ae0| 72 4e 61 6d 65 5b 30 5d | 2b 31 29 3b 0d 09 7d 0d |rName[0]|+1);..}.|
|00000af0| 09 65 6c 73 65 20 7b 0d | 09 09 69 66 20 28 69 74 |.else {.|..if (it|
|00000b00| 65 6d 3d 3d 6f 6b 42 75 | 74 74 6f 6e 29 0d 09 09 |em==okBu|tton)...|
|00000b10| 09 42 6c 6f 63 6b 4d 6f | 76 65 28 73 65 72 76 65 |.BlockMo|ve(serve|
|00000b20| 72 4e 61 6d 65 2c 67 50 | 72 65 66 73 2e 6d 61 69 |rName,gP|refs.mai|
|00000b30| 6c 53 65 72 76 65 72 4e | 61 6d 65 2c 73 65 72 76 |lServerN|ame,serv|
|00000b40| 65 72 4e 61 6d 65 5b 30 | 5d 2b 31 29 3b 0d 09 7d |erName[0|]+1);..}|
|00000b50| 0d 09 0d 09 69 66 20 28 | 21 67 44 6f 6e 65 20 26 |....if (|!gDone &|
|00000b60| 26 20 69 74 65 6d 3d 3d | 6f 6b 42 75 74 74 6f 6e |& item==|okButton|
|00000b70| 29 20 7b 0d 09 09 50 61 | 72 61 6d 54 65 78 74 28 |) {...Pa|ramText(|
|00000b80| 22 5c 70 59 6f 75 20 6d | 75 73 74 20 71 75 69 74 |"\pYou m|ust quit|
|00000b90| 20 61 6e 64 20 72 65 73 | 74 61 72 74 20 74 68 65 | and res|tart the|
|00000ba0| 20 70 72 6f 67 72 61 6d | 20 66 6f 72 20 74 68 69 | program| for thi|
|00000bb0| 73 20 63 68 61 6e 67 65 | 20 74 6f 20 74 61 6b 65 |s change| to take|
|00000bc0| 20 65 66 66 65 63 74 2e | 22 2c 22 5c 70 22 2c 22 | effect.|","\p","|
|00000bd0| 5c 70 22 2c 22 5c 70 22 | 29 3b 0d 09 09 4e 6f 74 |\p","\p"|);...Not|
|00000be0| 65 41 6c 65 72 74 28 6b | 45 72 72 44 6c 67 2c 6e |eAlert(k|ErrDlg,n|
|00000bf0| 69 6c 29 3b 0d 09 7d 0d | 7d 0d 0d 0d 2f 2a 09 47 |il);..}.|}.../*.G|
|00000c00| 65 74 43 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |etConfig|uration |
|00000c10| 69 73 20 63 61 6c 6c 65 | 64 20 74 6f 20 67 65 74 |is calle|d to get|
|00000c20| 20 74 68 65 20 6e 65 77 | 73 2f 6d 61 69 6c 20 73 | the new|s/mail s|
|00000c30| 65 72 76 65 72 20 69 70 | 20 61 64 64 72 65 73 73 |erver ip| address|
|00000c40| 65 73 2c 0d 09 67 69 76 | 65 6e 20 74 68 65 69 72 |es,..giv|en their|
|00000c50| 20 6e 61 6d 65 73 20 66 | 72 6f 6d 20 74 68 65 20 | names f|rom the |
|00000c60| 70 72 65 66 65 72 65 6e | 63 65 73 20 66 69 6c 65 |preferen|ces file|
|00000c70| 2e 0d 2a 2f 0d 0d 76 6f | 69 64 20 47 65 74 43 6f |..*/..vo|id GetCo|
|00000c80| 6e 66 69 67 75 72 61 74 | 69 6f 6e 28 76 6f 69 64 |nfigurat|ion(void|
|00000c90| 29 0d 7b 0d 09 65 78 74 | 65 72 6e 20 75 6e 73 69 |).{..ext|ern unsi|
|00000ca0| 67 6e 65 64 20 6c 6f 6e | 67 20 67 4e 4e 54 50 41 |gned lon|g gNNTPA|
|00000cb0| 64 64 72 65 73 73 3b 0d | 09 65 78 74 65 72 6e 20 |ddress;.|.extern |
|00000cc0| 54 50 72 65 66 52 65 63 | 20 67 50 72 65 66 73 3b |TPrefRec| gPrefs;|
|00000cd0| 0d 09 53 74 72 32 35 35 | 20 6e 61 6d 65 3b 0d 09 |..Str255| name;..|
|00000ce0| 0d 09 69 66 20 28 67 50 | 72 65 66 73 2e 6e 65 77 |..if (gP|refs.new|
|00000cf0| 73 53 65 72 76 65 72 4e | 61 6d 65 5b 30 5d 20 3d |sServerN|ame[0] =|
|00000d00| 3d 20 27 5c 30 27 20 7c | 7c 20 67 50 72 65 66 73 |= '\0' ||| gPrefs|
|00000d10| 2e 6d 61 69 6c 53 65 72 | 76 65 72 4e 61 6d 65 5b |.mailSer|verName[|
|00000d20| 30 5d 20 3d 3d 20 27 5c | 30 27 29 20 7b 0d 09 09 |0] == '\|0') {...|
|00000d30| 43 68 61 6e 67 65 53 65 | 72 76 65 72 41 64 64 72 |ChangeSe|rverAddr|
|00000d40| 65 73 73 28 74 72 75 65 | 29 3b 0d 09 09 69 66 20 |ess(true|);...if |
|00000d50| 28 67 50 72 65 66 73 2e | 6e 65 77 73 53 65 72 76 |(gPrefs.|newsServ|
|00000d60| 65 72 4e 61 6d 65 5b 30 | 5d 20 3d 3d 20 27 5c 30 |erName[0|] == '\0|
|00000d70| 27 29 20 7b 0d 09 09 09 | 67 4e 4e 54 50 41 64 64 |') {....|gNNTPAdd|
|00000d80| 72 65 73 73 20 3d 20 6b | 4e 4e 54 50 41 64 64 72 |ress = k|NNTPAddr|
|00000d90| 65 73 73 3b 0d 09 09 09 | 72 65 74 75 72 6e 3b 0d |ess;....|return;.|
|00000da0| 09 09 7d 0d 09 09 43 68 | 61 6e 67 65 53 65 72 76 |..}...Ch|angeServ|
|00000db0| 65 72 41 64 64 72 65 73 | 73 28 66 61 6c 73 65 29 |erAddres|s(false)|
|00000dc0| 3b 0d 09 09 69 66 20 28 | 67 50 72 65 66 73 2e 6d |;...if (|gPrefs.m|
|00000dd0| 61 69 6c 53 65 72 76 65 | 72 4e 61 6d 65 5b 30 5d |ailServe|rName[0]|
|00000de0| 20 3d 3d 20 27 5c 30 27 | 29 20 7b 0d 09 09 09 67 | == '\0'|) {....g|
|00000df0| 53 4d 54 50 41 64 64 72 | 65 73 73 20 3d 20 6b 53 |SMTPAddr|ess = kS|
|00000e00| 4d 54 50 41 64 64 72 65 | 73 73 3b 0d 09 09 09 72 |MTPAddre|ss;....r|
|00000e10| 65 74 75 72 6e 3b 0d 09 | 09 7d 0d 09 7d 0d 09 42 |eturn;..|.}..}..B|
|00000e20| 6c 6f 63 6b 4d 6f 76 65 | 28 67 50 72 65 66 73 2e |lockMove|(gPrefs.|
|00000e30| 6e 65 77 73 53 65 72 76 | 65 72 4e 61 6d 65 2c 6e |newsServ|erName,n|
|00000e40| 61 6d 65 2c 28 67 50 72 | 65 66 73 2e 6e 65 77 73 |ame,(gPr|efs.news|
|00000e50| 53 65 72 76 65 72 4e 61 | 6d 65 29 5b 30 5d 2b 31 |ServerNa|me)[0]+1|
|00000e60| 29 3b 0d 09 70 32 63 73 | 74 72 28 28 63 68 61 72 |);..p2cs|tr((char|
|00000e70| 20 2a 29 6e 61 6d 65 29 | 3b 0d 09 69 66 20 28 43 | *)name)|;..if (C|
|00000e80| 6f 6e 76 65 72 74 53 74 | 72 69 6e 67 54 6f 41 64 |onvertSt|ringToAd|
|00000e90| 64 72 28 28 63 68 61 72 | 20 2a 29 6e 61 6d 65 2c |dr((char| *)name,|
|00000ea0| 26 67 4e 4e 54 50 41 64 | 64 72 65 73 73 29 21 3d |&gNNTPAd|dress)!=|
|00000eb0| 6e 6f 45 72 72 29 0d 09 | 09 67 4e 4e 54 50 41 64 |noErr)..|.gNNTPAd|
|00000ec0| 64 72 65 73 73 20 3d 20 | 6b 4e 4e 54 50 41 64 64 |dress = |kNNTPAdd|
|00000ed0| 72 65 73 73 3b 0d 09 42 | 6c 6f 63 6b 4d 6f 76 65 |ress;..B|lockMove|
|00000ee0| 28 67 50 72 65 66 73 2e | 6d 61 69 6c 53 65 72 76 |(gPrefs.|mailServ|
|00000ef0| 65 72 4e 61 6d 65 2c 6e | 61 6d 65 2c 28 67 50 72 |erName,n|ame,(gPr|
|00000f00| 65 66 73 2e 6d 61 69 6c | 53 65 72 76 65 72 4e 61 |efs.mail|ServerNa|
|00000f10| 6d 65 29 5b 30 5d 2b 31 | 29 3b 0d 09 70 32 63 73 |me)[0]+1|);..p2cs|
|00000f20| 74 72 28 28 63 68 61 72 | 20 2a 29 6e 61 6d 65 29 |tr((char| *)name)|
|00000f30| 3b 0d 09 69 66 20 28 43 | 6f 6e 76 65 72 74 53 74 |;..if (C|onvertSt|
|00000f40| 72 69 6e 67 54 6f 41 64 | 64 72 28 28 63 68 61 72 |ringToAd|dr((char|
|00000f50| 20 2a 29 6e 61 6d 65 2c | 26 67 53 4d 54 50 41 64 | *)name,|&gSMTPAd|
|00000f60| 64 72 65 73 73 29 21 3d | 6e 6f 45 72 72 29 0d 09 |dress)!=|noErr)..|
|00000f70| 09 67 53 4d 54 50 41 64 | 64 72 65 73 73 20 3d 20 |.gSMTPAd|dress = |
|00000f80| 6b 53 4d 54 50 41 64 64 | 72 65 73 73 3b 0d 7d 0d |kSMTPAdd|ress;.}.|
|00000f90| 0d 0d 2f 2a 09 54 68 69 | 73 20 69 73 20 74 68 65 |../*.Thi|s is the|
|00000fa0| 20 63 6f 6d 70 6c 65 74 | 69 6f 6e 20 72 6f 75 74 | complet|ion rout|
|00000fb0| 69 6e 65 20 75 73 65 64 | 20 66 6f 72 20 6e 61 6d |ine used| for nam|
|00000fc0| 65 2d 72 65 73 6f 6c 76 | 65 72 20 63 61 6c 6c 73 |e-resolv|er calls|
|00000fd0| 2e 0d 09 49 74 20 73 65 | 74 73 20 74 68 65 20 75 |...It se|ts the u|
|00000fe0| 73 65 72 44 61 74 61 50 | 74 72 20 66 6c 61 67 20 |serDataP|tr flag |
|00000ff0| 74 6f 20 69 6e 64 69 63 | 61 74 65 20 74 68 65 20 |to indic|ate the |
|00001000| 63 61 6c 6c 20 68 61 73 | 20 63 6f 6d 70 6c 65 74 |call has| complet|
|00001010| 65 64 2e 0d 2a 2f 0d 0d | 70 61 73 63 61 6c 20 76 |ed..*/..|pascal v|
|00001020| 6f 69 64 20 44 4e 52 52 | 65 73 75 6c 74 50 72 6f |oid DNRR|esultPro|
|00001030| 63 28 73 74 72 75 63 74 | 20 68 6f 73 74 49 6e 66 |c(struct| hostInf|
|00001040| 6f 20 2a 68 49 6e 66 6f | 50 74 72 2c 63 68 61 72 |o *hInfo|Ptr,char|
|00001050| 20 2a 75 73 65 72 44 61 | 74 61 50 74 72 29 0d 7b | *userDa|taPtr).{|
|00001060| 0d 23 70 72 61 67 6d 61 | 20 75 6e 75 73 65 64 20 |.#pragma| unused |
|00001070| 28 68 49 6e 66 6f 50 74 | 72 29 0d 0d 09 2a 75 73 |(hInfoPt|r)...*us|
|00001080| 65 72 44 61 74 61 50 74 | 72 20 3d 20 30 78 66 66 |erDataPt|r = 0xff|
|00001090| 3b 0d 7d 0d 0d 0d 2f 2a | 09 43 6f 6e 76 65 72 74 |;.}.../*|.Convert|
|000010a0| 53 74 72 69 6e 67 54 6f | 41 64 64 72 20 69 73 20 |StringTo|Addr is |
|000010b0| 61 20 73 69 6d 70 6c 65 | 20 63 61 6c 6c 20 74 6f |a simple| call to|
|000010c0| 20 67 65 74 20 61 20 68 | 6f 73 74 27 73 20 49 50 | get a h|ost's IP|
|000010d0| 20 6e 75 6d 62 65 72 2c | 20 67 69 76 65 6e 20 74 | number,| given t|
|000010e0| 68 65 20 6e 61 6d 65 0d | 09 6f 66 20 74 68 65 20 |he name.|.of the |
|000010f0| 68 6f 73 74 2e 0d 2a 2f | 0d 0d 4f 53 45 72 72 20 |host..*/|..OSErr |
|00001100| 43 6f 6e 76 65 72 74 53 | 74 72 69 6e 67 54 6f 41 |ConvertS|tringToA|
|00001110| 64 64 72 28 63 68 61 72 | 20 2a 6e 61 6d 65 2c 75 |ddr(char| *name,u|
|00001120| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 20 2a 6e 65 |nsigned |long *ne|
|00001130| 74 4e 75 6d 29 0d 7b 0d | 09 73 74 72 75 63 74 20 |tNum).{.|.struct |
|00001140| 68 6f 73 74 49 6e 66 6f | 20 68 49 6e 66 6f 3b 0d |hostInfo| hInfo;.|
|00001150| 09 4f 53 45 72 72 20 72 | 65 73 75 6c 74 3b 0d 09 |.OSErr r|esult;..|
|00001160| 63 68 61 72 20 64 6f 6e | 65 20 3d 20 30 78 30 30 |char don|e = 0x00|
|00001170| 3b 0d 09 65 78 74 65 72 | 6e 20 42 6f 6f 6c 65 61 |;..exter|n Boolea|
|00001180| 6e 20 67 43 61 6e 63 65 | 6c 3b 0d 0d 09 69 66 20 |n gCance|l;...if |
|00001190| 28 28 72 65 73 75 6c 74 | 20 3d 20 4f 70 65 6e 52 |((result| = OpenR|
|000011a0| 65 73 6f 6c 76 65 72 28 | 6e 69 6c 29 29 20 3d 3d |esolver(|nil)) ==|
|000011b0| 20 6e 6f 45 72 72 29 20 | 7b 0d 09 09 72 65 73 75 | noErr) |{...resu|
|000011c0| 6c 74 20 3d 20 53 74 72 | 54 6f 41 64 64 72 28 6e |lt = Str|ToAddr(n|
|000011d0| 61 6d 65 2c 26 68 49 6e | 66 6f 2c 44 4e 52 52 65 |ame,&hIn|fo,DNRRe|
|000011e0| 73 75 6c 74 50 72 6f 63 | 2c 26 64 6f 6e 65 29 3b |sultProc|,&done);|
|000011f0| 0d 09 09 69 66 20 28 72 | 65 73 75 6c 74 20 3d 3d |...if (r|esult ==|
|00001200| 20 63 61 63 68 65 46 61 | 75 6c 74 29 0d 09 09 09 | cacheFa|ult)....|
|00001210| 77 68 69 6c 65 20 28 21 | 64 6f 6e 65 29 0d 09 09 |while (!|done)...|
|00001220| 09 09 3b 20 2f 2a 20 77 | 61 69 74 20 66 6f 72 20 |..; /* w|ait for |
|00001230| 63 61 63 68 65 20 66 61 | 75 6c 74 20 72 65 73 6f |cache fa|ult reso|
|00001240| 6c 76 65 72 20 74 6f 20 | 62 65 20 63 61 6c 6c 65 |lver to |be calle|
|00001250| 64 20 62 79 20 69 6e 74 | 65 72 72 75 70 74 20 2a |d by int|errupt *|
|00001260| 2f 0d 09 09 43 6c 6f 73 | 65 52 65 73 6f 6c 76 65 |/...Clos|eResolve|
|00001270| 72 28 29 3b 0d 09 09 69 | 66 20 28 28 68 49 6e 66 |r();...i|f ((hInf|
|00001280| 6f 2e 72 74 6e 43 6f 64 | 65 20 3d 3d 20 6e 6f 45 |o.rtnCod|e == noE|
|00001290| 72 72 29 20 7c 7c 20 28 | 68 49 6e 66 6f 2e 72 74 |rr) || (|hInfo.rt|
|000012a0| 6e 43 6f 64 65 20 3d 3d | 20 63 61 63 68 65 46 61 |nCode ==| cacheFa|
|000012b0| 75 6c 74 29 29 20 7b 0d | 09 09 09 2a 6e 65 74 4e |ult)) {.|...*netN|
|000012c0| 75 6d 20 3d 20 68 49 6e | 66 6f 2e 61 64 64 72 5b |um = hIn|fo.addr[|
|000012d0| 30 5d 3b 0d 09 09 09 73 | 74 72 63 70 79 28 6e 61 |0];....s|trcpy(na|
|000012e0| 6d 65 2c 68 49 6e 66 6f | 2e 63 6e 61 6d 65 29 3b |me,hInfo|.cname);|
|000012f0| 0d 09 09 09 6e 61 6d 65 | 5b 73 74 72 6c 65 6e 28 |....name|[strlen(|
|00001300| 6e 61 6d 65 29 2d 31 5d | 20 3d 20 27 5c 30 27 3b |name)-1]| = '\0';|
|00001310| 0d 09 09 09 72 65 74 75 | 72 6e 20 6e 6f 45 72 72 |....retu|rn noErr|
|00001320| 3b 0d 09 09 7d 0d 09 7d | 0d 09 2a 6e 65 74 4e 75 |;...}..}|..*netNu|
|00001330| 6d 20 3d 20 30 3b 0d 0d | 09 72 65 74 75 72 6e 20 |m = 0;..|.return |
|00001340| 72 65 73 75 6c 74 3b 0d | 7d 0d 0d 0d 2f 2a 09 50 |result;.|}.../*.P|
|00001350| 61 73 73 77 6f 72 64 46 | 69 6c 74 65 72 20 69 73 |asswordF|ilter is|
|00001360| 20 74 68 65 20 64 69 61 | 6c 6f 67 20 66 69 6c 74 | the dia|log filt|
|00001370| 65 72 20 75 73 65 64 20 | 74 6f 20 73 77 69 74 63 |er used |to switc|
|00001380| 68 20 61 6c 6c 20 6b 65 | 79 73 20 70 72 65 73 73 |h all ke|ys press|
|00001390| 65 64 0d 09 69 6e 74 6f | 20 62 75 6c 6c 65 74 73 |ed..into| bullets|
|000013a0| 20 28 a5 29 20 74 6f 20 | 68 69 64 65 20 74 68 65 | (.) to |hide the|
|000013b0| 20 75 73 65 72 27 73 20 | 70 61 73 73 77 6f 72 64 | user's |password|
|000013c0| 20 66 72 6f 6d 20 76 69 | 65 77 2e 0d 2a 2f 0d 0d | from vi|ew..*/..|
|000013d0| 70 61 73 63 61 6c 20 42 | 6f 6f 6c 65 61 6e 20 50 |pascal B|oolean P|
|000013e0| 61 73 73 77 6f 72 64 46 | 69 6c 74 65 72 28 44 69 |asswordF|ilter(Di|
|000013f0| 61 6c 6f 67 50 74 72 20 | 74 68 65 44 69 61 6c 6f |alogPtr |theDialo|
|00001400| 67 2c 45 76 65 6e 74 52 | 65 63 6f 72 64 20 2a 74 |g,EventR|ecord *t|
|00001410| 68 65 45 76 65 6e 74 2c | 73 68 6f 72 74 20 2a 69 |heEvent,|short *i|
|00001420| 74 65 6d 48 69 74 29 0d | 7b 0d 09 44 69 61 6c 6f |temHit).|{..Dialo|
|00001430| 67 50 65 65 6b 20 64 50 | 65 65 6b 3b 0d 09 63 68 |gPeek dP|eek;..ch|
|00001440| 61 72 20 74 68 65 43 68 | 61 72 3b 0d 09 73 68 6f |ar theCh|ar;..sho|
|00001450| 72 74 20 73 65 6c 53 74 | 61 72 74 2c 73 65 6c 45 |rt selSt|art,selE|
|00001460| 6e 64 3b 0d 09 0d 09 64 | 50 65 65 6b 20 3d 20 28 |nd;....d|Peek = (|
|00001470| 44 69 61 6c 6f 67 50 65 | 65 6b 29 20 74 68 65 44 |DialogPe|ek) theD|
|00001480| 69 61 6c 6f 67 3b 0d 09 | 0d 09 69 66 20 28 28 74 |ialog;..|..if ((t|
|00001490| 68 65 45 76 65 6e 74 2d | 3e 77 68 61 74 20 3d 3d |heEvent-|>what ==|
|000014a0| 20 6b 65 79 44 6f 77 6e | 29 20 7c 7c 20 28 74 68 | keyDown|) || (th|
|000014b0| 65 45 76 65 6e 74 2d 3e | 77 68 61 74 20 3d 3d 20 |eEvent->|what == |
|000014c0| 61 75 74 6f 4b 65 79 29 | 29 20 7b 0d 09 09 69 66 |autoKey)|) {...if|
|000014d0| 20 28 28 74 68 65 45 76 | 65 6e 74 2d 3e 6d 6f 64 | ((theEv|ent->mod|
|000014e0| 69 66 69 65 72 73 20 26 | 20 63 6d 64 4b 65 79 29 |ifiers &| cmdKey)|
|000014f0| 20 21 3d 20 30 29 20 7b | 0d 09 09 09 72 65 74 75 | != 0) {|....retu|
|00001500| 72 6e 20 43 6d 64 4b 65 | 79 46 69 6c 74 65 72 28 |rn CmdKe|yFilter(|
|00001510| 74 68 65 44 69 61 6c 6f | 67 2c 74 68 65 45 76 65 |theDialo|g,theEve|
|00001520| 6e 74 2c 69 74 65 6d 48 | 69 74 29 3b 0d 09 09 7d |nt,itemH|it);...}|
|00001530| 0d 09 09 69 66 20 28 64 | 50 65 65 6b 2d 3e 65 64 |...if (d|Peek->ed|
|00001540| 69 74 46 69 65 6c 64 20 | 3d 3d 20 32 29 20 7b 0d |itField |== 2) {.|
|00001550| 09 09 09 74 68 65 43 68 | 61 72 20 3d 20 74 68 65 |...theCh|ar = the|
|00001560| 45 76 65 6e 74 2d 3e 6d | 65 73 73 61 67 65 20 26 |Event->m|essage &|
|00001570| 20 63 68 61 72 43 6f 64 | 65 4d 61 73 6b 3b 0d 09 | charCod|eMask;..|
|00001580| 09 09 73 65 6c 53 74 61 | 72 74 20 3d 20 28 2a 2a |..selSta|rt = (**|
|00001590| 28 64 50 65 65 6b 2d 3e | 74 65 78 74 48 29 29 2e |(dPeek->|textH)).|
|000015a0| 73 65 6c 53 74 61 72 74 | 3b 0d 09 09 09 73 65 6c |selStart|;....sel|
|000015b0| 45 6e 64 20 3d 20 28 2a | 2a 28 64 50 65 65 6b 2d |End = (*|*(dPeek-|
|000015c0| 3e 74 65 78 74 48 29 29 | 2e 73 65 6c 45 6e 64 3b |>textH))|.selEnd;|
|000015d0| 0d 09 09 09 73 77 69 74 | 63 68 20 28 74 68 65 43 |....swit|ch (theC|
|000015e0| 68 61 72 29 20 7b 0d 09 | 09 09 09 63 61 73 65 20 |har) {..|...case |
|000015f0| 30 78 30 38 3a 09 09 2f | 2a 20 62 61 63 6b 73 70 |0x08:../|* backsp|
|00001600| 61 63 65 20 2a 2f 0d 09 | 09 09 09 09 69 66 20 28 |ace */..|....if (|
|00001610| 73 65 6c 53 74 61 72 74 | 20 3d 3d 20 73 65 6c 45 |selStart| == selE|
|00001620| 6e 64 29 20 7b 0d 09 09 | 09 09 09 09 69 66 20 28 |nd) {...|....if (|
|00001630| 73 65 6c 53 74 61 72 74 | 20 3e 20 30 29 0d 09 09 |selStart| > 0)...|
|00001640| 09 09 09 09 09 42 6c 6f | 63 6b 4d 6f 76 65 28 28 |.....Blo|ckMove((|
|00001650| 50 74 72 29 67 50 77 53 | 74 72 20 2b 20 73 65 6c |Ptr)gPwS|tr + sel|
|00001660| 53 74 61 72 74 2c 28 50 | 74 72 29 67 50 77 53 74 |Start,(P|tr)gPwSt|
|00001670| 72 20 2b 20 73 65 6c 53 | 74 61 72 74 2d 31 2c 73 |r + selS|tart-1,s|
|00001680| 74 72 6c 65 6e 28 67 50 | 77 53 74 72 29 2d 73 65 |trlen(gP|wStr)-se|
|00001690| 6c 53 74 61 72 74 2b 31 | 29 3b 0d 09 09 09 09 09 |lStart+1|);......|
|000016a0| 7d 0d 09 09 09 09 09 65 | 6c 73 65 0d 09 09 09 09 |}......e|lse.....|
|000016b0| 09 09 42 6c 6f 63 6b 4d | 6f 76 65 28 28 50 74 72 |..BlockM|ove((Ptr|
|000016c0| 29 67 50 77 53 74 72 20 | 2b 20 73 65 6c 45 6e 64 |)gPwStr |+ selEnd|
|000016d0| 2c 28 50 74 72 29 67 50 | 77 53 74 72 20 2b 20 73 |,(Ptr)gP|wStr + s|
|000016e0| 65 6c 53 74 61 72 74 2c | 73 74 72 6c 65 6e 28 67 |elStart,|strlen(g|
|000016f0| 50 77 53 74 72 29 2d 73 | 65 6c 45 6e 64 2b 31 29 |PwStr)-s|elEnd+1)|
|00001700| 3b 0d 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |;......b|reak;...|
|00001710| 09 09 63 61 73 65 20 43 | 52 3a 09 2f 2a 20 43 52 |..case C|R:./* CR|
|00001720| 20 09 2a 2f 0d 09 09 09 | 09 63 61 73 65 20 30 78 | .*/....|.case 0x|
|00001730| 30 33 3a 09 2f 2a 20 65 | 6e 74 65 72 20 2a 2f 0d |03:./* e|nter */.|
|00001740| 09 09 09 09 09 2a 69 74 | 65 6d 48 69 74 20 3d 20 |.....*it|emHit = |
|00001750| 6f 6b 42 75 74 74 6f 6e | 3b 0d 09 09 09 09 09 72 |okButton|;......r|
|00001760| 65 74 75 72 6e 20 74 72 | 75 65 3b 0d 09 09 09 09 |eturn tr|ue;.....|
|00001770| 09 62 72 65 61 6b 3b 0d | 09 09 09 09 63 61 73 65 |.break;.|....case|
|00001780| 20 30 78 30 39 3a 09 2f | 2a 20 74 61 62 20 09 2a | 0x09:./|* tab .*|
|00001790| 2f 0d 09 09 09 09 63 61 | 73 65 20 30 78 31 63 3a |/.....ca|se 0x1c:|
|000017a0| 09 2f 2a 20 6c 65 66 74 | 20 2a 2f 0d 09 09 09 09 |./* left| */.....|
|000017b0| 63 61 73 65 20 30 78 31 | 64 3a 09 2f 2a 20 72 69 |case 0x1|d:./* ri|
|000017c0| 67 68 74 20 2a 2f 0d 09 | 09 09 09 63 61 73 65 20 |ght */..|...case |
|000017d0| 30 78 31 65 3a 09 2f 2a | 20 75 70 20 09 2a 2f 0d |0x1e:./*| up .*/.|
|000017e0| 09 09 09 09 63 61 73 65 | 20 30 78 31 66 3a 09 2f |....case| 0x1f:./|
|000017f0| 2a 20 64 6f 77 6e 20 2a | 2f 0d 09 09 09 09 09 72 |* down *|/......r|
|00001800| 65 74 75 72 6e 20 66 61 | 6c 73 65 3b 0d 09 09 09 |eturn fa|lse;....|
|00001810| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 09 64 65 66 |..break;|.....def|
|00001820| 61 75 6c 74 3a 0d 09 09 | 09 09 09 42 6c 6f 63 6b |ault:...|...Block|
|00001830| 4d 6f 76 65 28 28 50 74 | 72 29 67 50 77 53 74 72 |Move((Pt|r)gPwStr|
|00001840| 2b 73 65 6c 45 6e 64 2c | 28 50 74 72 29 67 50 77 |+selEnd,|(Ptr)gPw|
|00001850| 53 74 72 2b 73 65 6c 45 | 6e 64 2b 31 2c 73 74 72 |Str+selE|nd+1,str|
|00001860| 6c 65 6e 28 67 50 77 53 | 74 72 29 2d 73 65 6c 45 |len(gPwS|tr)-selE|
|00001870| 6e 64 2b 31 29 3b 0d 09 | 09 09 09 09 2a 28 67 50 |nd+1);..|....*(gP|
|00001880| 77 53 74 72 2b 73 65 6c | 53 74 61 72 74 29 20 3d |wStr+sel|Start) =|
|00001890| 20 74 68 65 43 68 61 72 | 3b 0d 09 09 09 09 09 74 | theChar|;......t|
|000018a0| 68 65 45 76 65 6e 74 2d | 3e 6d 65 73 73 61 67 65 |heEvent-|>message|
|000018b0| 20 3d 20 30 78 66 66 66 | 66 66 66 30 30 20 2b 20 | = 0xfff|fff00 + |
|000018c0| 27 a5 27 3b 0d 09 09 09 | 09 09 72 65 74 75 72 6e |'.';....|..return|
|000018d0| 20 66 61 6c 73 65 3b 0d | 09 09 09 09 09 62 72 65 | false;.|.....bre|
|000018e0| 61 6b 3b 0d 09 09 09 7d | 0d 09 09 7d 0d 09 09 69 |ak;....}|...}...i|
|000018f0| 66 20 28 28 74 68 65 43 | 68 61 72 20 3d 3d 20 43 |f ((theC|har == C|
|00001900| 52 29 20 7c 7c 20 28 74 | 68 65 43 68 61 72 20 3d |R) || (t|heChar =|
|00001910| 3d 20 30 78 30 33 29 29 | 09 7b 0d 09 09 09 2a 69 |= 0x03))|.{....*i|
|00001920| 74 65 6d 48 69 74 20 3d | 20 6f 6b 42 75 74 74 6f |temHit =| okButto|
|00001930| 6e 3b 0d 09 09 09 72 65 | 74 75 72 6e 20 74 72 75 |n;....re|turn tru|
|00001940| 65 3b 0d 09 09 7d 0d 09 | 7d 0d 09 09 0d 09 72 65 |e;...}..|}.....re|
|00001950| 74 75 72 6e 20 66 61 6c | 73 65 3b 0d 7d 0d 0d 0d |turn fal|se;.}...|
|00001960| 2f 2a 09 47 65 74 55 49 | 6e 66 6f 20 64 69 73 70 |/*.GetUI|nfo disp|
|00001970| 6c 61 79 73 20 6d 6f 64 | 61 6c 20 64 69 61 6c 6f |lays mod|al dialo|
|00001980| 67 73 20 66 6f 72 20 74 | 68 65 20 75 73 65 72 20 |gs for t|he user |
|00001990| 74 6f 20 65 6e 74 65 72 | 20 74 68 65 69 72 0d 09 |to enter| their..|
|000019a0| 6c 6f 67 69 6e 20 69 64 | 2c 20 68 6f 73 74 2c 20 |login id|, host, |
|000019b0| 61 6e 64 20 70 61 73 73 | 77 6f 72 64 20 66 6f 72 |and pass|word for|
|000019c0| 20 61 75 74 68 65 6e 74 | 69 63 61 74 69 6f 6e 2e | authent|ication.|
|000019d0| 0d 2a 2f 0d 0d 42 6f 6f | 6c 65 61 6e 20 47 65 74 |.*/..Boo|lean Get|
|000019e0| 55 49 6e 66 6f 28 53 74 | 72 32 35 35 20 6c 6f 67 |UInfo(St|r255 log|
|000019f0| 69 6e 2c 53 74 72 32 35 | 35 20 70 61 73 73 2c 53 |in,Str25|5 pass,S|
|00001a00| 74 72 32 35 35 20 68 6f | 73 74 29 0d 7b 0d 09 44 |tr255 ho|st).{..D|
|00001a10| 69 61 6c 6f 67 50 74 72 | 20 74 68 65 44 6c 67 3b |ialogPtr| theDlg;|
|00001a20| 0d 09 73 68 6f 72 74 20 | 69 74 65 6d 2c 69 54 79 |..short |item,iTy|
|00001a30| 70 65 3b 0d 09 48 61 6e | 64 6c 65 20 69 48 6e 64 |pe;..Han|dle iHnd|
|00001a40| 6c 3b 0d 09 52 65 63 74 | 20 69 52 65 63 74 3b 0d |l;..Rect| iRect;.|
|00001a50| 09 09 0d 09 74 68 65 44 | 6c 67 20 3d 20 47 65 74 |....theD|lg = Get|
|00001a60| 4e 65 77 44 69 61 6c 6f | 67 28 6b 4c 6f 67 69 6e |NewDialo|g(kLogin|
|00001a70| 44 6c 67 2c 6e 69 6c 2c | 28 57 69 6e 64 6f 77 50 |Dlg,nil,|(WindowP|
|00001a80| 74 72 29 2d 31 29 3b 0d | 09 4f 75 74 6c 69 6e 65 |tr)-1);.|.Outline|
|00001a90| 4f 4b 28 74 68 65 44 6c | 67 29 3b 0d 09 47 65 74 |OK(theDl|g);..Get|
|00001aa0| 44 49 74 65 6d 28 74 68 | 65 44 6c 67 2c 33 2c 26 |DItem(th|eDlg,3,&|
|00001ab0| 69 54 79 70 65 2c 26 69 | 48 6e 64 6c 2c 26 69 52 |iType,&i|Hndl,&iR|
|00001ac0| 65 63 74 29 3b 0d 09 53 | 65 74 49 54 65 78 74 28 |ect);..S|etIText(|
|00001ad0| 69 48 6e 64 6c 2c 28 53 | 74 72 69 6e 67 50 74 72 |iHndl,(S|tringPtr|
|00001ae0| 29 63 32 70 73 74 72 28 | 28 63 68 61 72 20 2a 29 |)c2pstr(|(char *)|
|00001af0| 68 6f 73 74 29 29 3b 0d | 09 47 65 74 44 49 74 65 |host));.|.GetDIte|
|00001b00| 6d 28 74 68 65 44 6c 67 | 2c 34 2c 26 69 54 79 70 |m(theDlg|,4,&iTyp|
|00001b10| 65 2c 26 69 48 6e 64 6c | 2c 26 69 52 65 63 74 29 |e,&iHndl|,&iRect)|
|00001b20| 3b 0d 09 53 65 74 49 54 | 65 78 74 28 69 48 6e 64 |;..SetIT|ext(iHnd|
|00001b30| 6c 2c 28 53 74 72 69 6e | 67 50 74 72 29 63 32 70 |l,(Strin|gPtr)c2p|
|00001b40| 73 74 72 28 28 63 68 61 | 72 20 2a 29 6c 6f 67 69 |str((cha|r *)logi|
|00001b50| 6e 29 29 3b 0d 09 64 6f | 0d 09 09 4d 6f 64 61 6c |n));..do|...Modal|
|00001b60| 44 69 61 6c 6f 67 28 43 | 6d 64 4b 65 79 46 69 6c |Dialog(C|mdKeyFil|
|00001b70| 74 65 72 2c 26 69 74 65 | 6d 29 3b 0d 09 77 68 69 |ter,&ite|m);..whi|
|00001b80| 6c 65 20 28 69 74 65 6d | 20 21 3d 20 6f 6b 42 75 |le (item| != okBu|
|00001b90| 74 74 6f 6e 20 26 26 20 | 69 74 65 6d 20 21 3d 20 |tton && |item != |
|00001ba0| 63 61 6e 63 65 6c 42 75 | 74 74 6f 6e 29 3b 0d 09 |cancelBu|tton);..|
|00001bb0| 0d 09 47 65 74 44 49 74 | 65 6d 28 74 68 65 44 6c |..GetDIt|em(theDl|
|00001bc0| 67 2c 33 2c 26 69 54 79 | 70 65 2c 26 69 48 6e 64 |g,3,&iTy|pe,&iHnd|
|00001bd0| 6c 2c 26 69 52 65 63 74 | 29 3b 0d 09 47 65 74 49 |l,&iRect|);..GetI|
|00001be0| 54 65 78 74 28 69 48 6e | 64 6c 2c 68 6f 73 74 29 |Text(iHn|dl,host)|
|00001bf0| 3b 0d 09 47 65 74 44 49 | 74 65 6d 28 74 68 65 44 |;..GetDI|tem(theD|
|00001c00| 6c 67 2c 34 2c 26 69 54 | 79 70 65 2c 26 69 48 6e |lg,4,&iT|ype,&iHn|
|00001c10| 64 6c 2c 26 69 52 65 63 | 74 29 3b 0d 09 47 65 74 |dl,&iRec|t);..Get|
|00001c20| 49 54 65 78 74 28 69 48 | 6e 64 6c 2c 6c 6f 67 69 |IText(iH|ndl,logi|
|00001c30| 6e 29 3b 0d 09 0d 09 44 | 69 73 70 6f 73 44 69 61 |n);....D|isposDia|
|00001c40| 6c 6f 67 28 74 68 65 44 | 6c 67 29 3b 0d 0d 09 50 |log(theD|lg);...P|
|00001c50| 61 72 61 6d 54 65 78 74 | 28 68 6f 73 74 2c 22 5c |aramText|(host,"\|
|00001c60| 70 22 2c 22 5c 70 22 2c | 22 5c 70 22 29 3b 0d 0d |p","\p",|"\p");..|
|00001c70| 09 70 32 63 73 74 72 28 | 28 63 68 61 72 20 2a 29 |.p2cstr(|(char *)|
|00001c80| 6c 6f 67 69 6e 29 3b 0d | 09 70 32 63 73 74 72 28 |login);.|.p2cstr(|
|00001c90| 28 63 68 61 72 20 2a 29 | 68 6f 73 74 29 3b 0d 0d |(char *)|host);..|
|00001ca0| 09 69 66 20 28 69 74 65 | 6d 20 3d 3d 20 63 61 6e |.if (ite|m == can|
|00001cb0| 63 65 6c 42 75 74 74 6f | 6e 29 0d 09 09 72 65 74 |celButto|n)...ret|
|00001cc0| 75 72 6e 20 66 61 6c 73 | 65 3b 0d 09 0d 09 69 66 |urn fals|e;....if|
|00001cd0| 20 28 21 68 6f 73 74 5b | 30 5d 20 7c 7c 20 21 6c | (!host[|0] || !l|
|00001ce0| 6f 67 69 6e 5b 30 5d 29 | 0d 09 09 72 65 74 75 72 |ogin[0])|...retur|
|00001cf0| 6e 20 66 61 6c 73 65 3b | 0d 09 0d 09 74 68 65 44 |n false;|....theD|
|00001d00| 6c 67 20 3d 20 47 65 74 | 4e 65 77 44 69 61 6c 6f |lg = Get|NewDialo|
|00001d10| 67 28 6b 50 61 73 73 44 | 6c 67 2c 6e 69 6c 2c 28 |g(kPassD|lg,nil,(|
|00001d20| 57 69 6e 64 6f 77 50 74 | 72 29 2d 31 29 3b 0d 09 |WindowPt|r)-1);..|
|00001d30| 4f 75 74 6c 69 6e 65 4f | 4b 28 74 68 65 44 6c 67 |OutlineO|K(theDlg|
|00001d40| 29 3b 0d 0d 09 2a 67 50 | 77 53 74 72 20 3d 20 27 |);...*gP|wStr = '|
|00001d50| 5c 30 27 3b 0d 0d 09 64 | 6f 0d 09 09 4d 6f 64 61 |\0';...d|o...Moda|
|00001d60| 6c 44 69 61 6c 6f 67 28 | 50 61 73 73 77 6f 72 64 |lDialog(|Password|
|00001d70| 46 69 6c 74 65 72 2c 26 | 69 74 65 6d 29 3b 0d 09 |Filter,&|item);..|
|00001d80| 77 68 69 6c 65 20 28 69 | 74 65 6d 20 21 3d 20 6f |while (i|tem != o|
|00001d90| 6b 42 75 74 74 6f 6e 20 | 26 26 20 69 74 65 6d 20 |kButton |&& item |
|00001da0| 21 3d 20 63 61 6e 63 65 | 6c 42 75 74 74 6f 6e 29 |!= cance|lButton)|
|00001db0| 3b 0d 0d 09 44 69 73 70 | 6f 73 44 69 61 6c 6f 67 |;...Disp|osDialog|
|00001dc0| 28 74 68 65 44 6c 67 29 | 3b 09 0d 09 69 66 20 28 |(theDlg)|;...if (|
|00001dd0| 69 74 65 6d 20 3d 3d 20 | 63 61 6e 63 65 6c 42 75 |item == |cancelBu|
|00001de0| 74 74 6f 6e 29 0d 09 09 | 72 65 74 75 72 6e 20 66 |tton)...|return f|
|00001df0| 61 6c 73 65 3b 0d 0d 09 | 73 74 72 63 70 79 28 70 |alse;...|strcpy(p|
|00001e00| 61 73 73 2c 67 50 77 53 | 74 72 29 3b 0d 0d 09 72 |ass,gPwS|tr);...r|
|00001e10| 65 74 75 72 6e 20 74 72 | 75 65 3b 0d 7d 0d 0d 0d |eturn tr|ue;.}...|
|00001e20| 2f 2a 09 41 75 74 68 65 | 6e 74 69 63 61 74 65 20 |/*.Authe|nticate |
|00001e30| 69 73 20 63 61 6c 6c 65 | 64 20 74 6f 20 63 68 65 |is calle|d to che|
|00001e40| 63 6b 20 74 68 65 20 61 | 63 63 75 72 61 63 79 20 |ck the a|ccuracy |
|00001e50| 6f 66 20 61 20 75 73 65 | 72 27 73 20 69 64 20 61 |of a use|r's id a|
|00001e60| 6e 64 0d 09 70 61 73 73 | 77 6f 72 64 2e 20 20 45 |nd..pass|word. E|
|00001e70| 76 65 6e 74 75 61 6c 6c | 79 2c 20 74 68 69 73 20 |ventuall|y, this |
|00001e80| 70 72 6f 63 65 64 75 72 | 65 20 63 6f 75 6c 64 20 |procedur|e could |
|00001e90| 62 65 20 72 65 70 6c 61 | 63 65 64 20 77 69 74 68 |be repla|ced with|
|00001ea0| 20 61 0d 09 6d 6f 72 65 | 20 73 65 63 75 72 65 20 | a..more| secure |
|00001eb0| 6d 65 74 68 6f 64 2e 20 | 20 43 75 72 72 65 6e 74 |method. | Current|
|00001ec0| 6c 79 2c 20 46 54 50 20 | 69 73 20 75 73 65 64 20 |ly, FTP |is used |
|00001ed0| 66 6f 72 20 61 75 74 68 | 65 6e 74 69 63 61 74 69 |for auth|enticati|
|00001ee0| 6f 6e 2e 0d 2a 2f 0d 0d | 42 6f 6f 6c 65 61 6e 20 |on..*/..|Boolean |
|00001ef0| 41 75 74 68 65 6e 74 69 | 63 61 74 65 28 76 6f 69 |Authenti|cate(voi|
|00001f00| 64 29 0d 7b 0d 09 65 78 | 74 65 72 6e 20 42 6f 6f |d).{..ex|tern Boo|
|00001f10| 6c 65 61 6e 20 67 41 75 | 74 68 65 6e 74 69 63 61 |lean gAu|thentica|
|00001f20| 74 65 64 3b 0d 09 65 78 | 74 65 72 6e 20 63 68 61 |ted;..ex|tern cha|
|00001f30| 72 20 67 50 61 73 73 5b | 5d 3b 0d 09 65 78 74 65 |r gPass[|];..exte|
|00001f40| 72 6e 20 54 50 72 65 66 | 52 65 63 20 67 50 72 65 |rn TPref|Rec gPre|
|00001f50| 66 73 3b 0d 09 75 6e 73 | 69 67 6e 65 64 20 6c 6f |fs;..uns|igned lo|
|00001f60| 6e 67 20 63 6f 6e 6e 49 | 44 3b 0d 09 0d 09 69 66 |ng connI|D;....if|
|00001f70| 20 28 67 41 75 74 68 65 | 6e 74 69 63 61 74 65 64 | (gAuthe|nticated|
|00001f80| 29 0d 09 09 72 65 74 75 | 72 6e 20 74 72 75 65 3b |)...retu|rn true;|
|00001f90| 0d 09 0d 09 69 66 20 28 | 21 47 65 74 55 49 6e 66 |....if (|!GetUInf|
|00001fa0| 6f 28 28 53 74 72 69 6e | 67 50 74 72 29 67 50 72 |o((Strin|gPtr)gPr|
|00001fb0| 65 66 73 2e 6e 61 6d 65 | 2c 28 53 74 72 69 6e 67 |efs.name|,(String|
|00001fc0| 50 74 72 29 67 50 61 73 | 73 2c 28 53 74 72 69 6e |Ptr)gPas|s,(Strin|
|00001fd0| 67 50 74 72 29 67 50 72 | 65 66 73 2e 68 6f 73 74 |gPtr)gPr|efs.host|
|00001fe0| 29 29 0d 09 09 72 65 74 | 75 72 6e 20 66 61 6c 73 |))...ret|urn fals|
|00001ff0| 65 3b 0d 09 09 0d 09 53 | 74 61 74 75 73 57 69 6e |e;.....S|tatusWin|
|00002000| 64 6f 77 28 22 41 75 74 | 68 65 6e 74 69 63 61 74 |dow("Aut|henticat|
|00002010| 69 6e 67 20 75 73 65 72 | 2e 2e 2e 22 2c 2d 31 29 |ing user|...",-1)|
|00002020| 3b 0d 09 0d 09 69 66 20 | 28 46 54 50 43 6f 6e 6e |;....if |(FTPConn|
|00002030| 65 63 74 28 26 63 6f 6e | 6e 49 44 2c 28 63 68 61 |ect(&con|nID,(cha|
|00002040| 72 20 2a 29 67 50 72 65 | 66 73 2e 68 6f 73 74 2c |r *)gPre|fs.host,|
|00002050| 28 63 68 61 72 20 2a 29 | 67 50 72 65 66 73 2e 6e |(char *)|gPrefs.n|
|00002060| 61 6d 65 2c 67 50 61 73 | 73 29 21 3d 6e 6f 45 72 |ame,gPas|s)!=noEr|
|00002070| 72 29 20 7b 0d 09 09 46 | 54 50 44 69 73 63 6f 6e |r) {...F|TPDiscon|
|00002080| 6e 65 63 74 28 63 6f 6e | 6e 49 44 29 3b 0d 09 09 |nect(con|nID);...|
|00002090| 43 6c 6f 73 65 53 74 61 | 74 75 73 57 69 6e 64 6f |CloseSta|tusWindo|
|000020a0| 77 28 29 3b 0d 09 09 50 | 61 72 61 6d 54 65 78 74 |w();...P|aramText|
|000020b0| 28 22 5c 70 49 6e 63 6f | 72 72 65 63 74 20 75 73 |("\pInco|rrect us|
|000020c0| 65 72 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 2e 22 |er infor|mation."|
|000020d0| 2c 22 5c 70 22 2c 22 5c | 70 22 2c 22 5c 70 22 29 |,"\p","\|p","\p")|
|000020e0| 3b 0d 09 09 4e 6f 74 65 | 41 6c 65 72 74 28 6b 45 |;...Note|Alert(kE|
|000020f0| 72 72 44 6c 67 2c 6e 69 | 6c 29 3b 0d 09 09 72 65 |rrDlg,ni|l);...re|
|00002100| 74 75 72 6e 20 66 61 6c | 73 65 3b 0d 09 7d 0d 09 |turn fal|se;..}..|
|00002110| 46 54 50 44 69 73 63 6f | 6e 6e 65 63 74 28 63 6f |FTPDisco|nnect(co|
|00002120| 6e 6e 49 44 29 3b 0d 09 | 43 6c 6f 73 65 53 74 61 |nnID);..|CloseSta|
|00002130| 74 75 73 57 69 6e 64 6f | 77 28 29 3b 0d 0d 09 67 |tusWindo|w();...g|
|00002140| 41 75 74 68 65 6e 74 69 | 63 61 74 65 64 20 3d 20 |Authenti|cated = |
|00002150| 74 72 75 65 3b 0d 09 72 | 65 74 75 72 6e 20 74 72 |true;..r|eturn tr|
|00002160| 75 65 3b 0d 7d 0d 0d 0d | 2f 2a 09 4c 6f 67 6f 75 |ue;.}...|/*.Logou|
|00002170| 74 20 72 65 6d 6f 76 65 | 73 20 74 68 65 20 75 73 |t remove|s the us|
|00002180| 65 72 27 73 20 70 61 73 | 73 77 6f 72 64 20 66 72 |er's pas|sword fr|
|00002190| 6f 6d 20 6d 65 6d 6f 72 | 79 2e 0d 2a 2f 0d 0d 76 |om memor|y..*/..v|
|000021a0| 6f 69 64 20 4c 6f 67 6f | 75 74 28 76 6f 69 64 29 |oid Logo|ut(void)|
|000021b0| 0d 7b 0d 09 65 78 74 65 | 72 6e 20 42 6f 6f 6c 65 |.{..exte|rn Boole|
|000021c0| 61 6e 20 67 41 75 74 68 | 65 6e 74 69 63 61 74 65 |an gAuth|enticate|
|000021d0| 64 3b 0d 09 65 78 74 65 | 72 6e 20 63 68 61 72 20 |d;..exte|rn char |
|000021e0| 67 50 61 73 73 5b 5d 3b | 0d 0d 09 73 74 72 63 70 |gPass[];|...strcp|
|000021f0| 79 28 67 50 61 73 73 2c | 22 25 25 25 25 25 25 25 |y(gPass,|"%%%%%%%|
|00002200| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002210| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00002220| 25 22 29 3b 0d 09 67 41 | 75 74 68 65 6e 74 69 63 |%");..gA|uthentic|
|00002230| 61 74 65 64 20 3d 20 66 | 61 6c 73 65 3b 0d 7d 0d |ated = f|alse;.}.|
|00002240| 0d 0d 2f 2a 09 47 65 74 | 46 72 6f 6d 4e 65 74 20 |../*.Get|FromNet |
|00002250| 67 65 74 73 20 61 20 6e | 65 77 73 72 63 20 66 69 |gets a n|ewsrc fi|
|00002260| 6c 65 20 66 72 6f 6d 20 | 74 68 65 20 75 73 65 72 |le from |the user|
|00002270| 27 73 20 72 65 6d 6f 74 | 65 20 61 63 63 6f 75 6e |'s remot|e accoun|
|00002280| 74 2e 0d 2a 2f 0d 0d 76 | 6f 69 64 20 47 65 74 46 |t..*/..v|oid GetF|
|00002290| 72 6f 6d 4e 65 74 28 76 | 6f 69 64 29 0d 7b 0d 09 |romNet(v|oid).{..|
|000022a0| 65 78 74 65 72 6e 20 63 | 68 61 72 20 67 50 61 73 |extern c|har gPas|
|000022b0| 73 5b 5d 3b 0d 09 65 78 | 74 65 72 6e 20 54 50 72 |s[];..ex|tern TPr|
|000022c0| 65 66 52 65 63 20 67 50 | 72 65 66 73 3b 0d 09 0d |efRec gP|refs;...|
|000022d0| 09 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 20 63 |.unsigne|d long c|
|000022e0| 6f 6e 6e 49 44 3b 0d 09 | 50 74 72 20 6e 65 77 73 |onnID;..|Ptr news|
|000022f0| 44 61 74 61 3b 0d 09 63 | 68 61 72 20 2a 63 75 72 |Data;..c|har *cur|
|00002300| 72 65 6e 74 3b 0d 09 54 | 77 69 6e 64 6f 77 49 6e |rent;..T|windowIn|
|00002310| 66 6f 20 2a 69 6e 66 6f | 3b 0d 09 57 69 6e 64 6f |fo *info|;..Windo|
|00002320| 77 50 74 72 20 77 69 6e | 64 6f 77 3b 0d 09 4f 53 |wPtr win|dow;..OS|
|00002330| 45 72 72 20 65 72 72 3b | 0d 09 65 78 74 65 72 6e |Err err;|..extern|
|00002340| 20 54 50 72 65 66 52 65 | 63 20 67 50 72 65 66 73 | TPrefRe|c gPrefs|
|00002350| 3b 0d 09 0d 09 69 66 20 | 28 21 41 75 74 68 65 6e |;....if |(!Authen|
|00002360| 74 69 63 61 74 65 28 29 | 29 0d 09 09 72 65 74 75 |ticate()|)...retu|
|00002370| 72 6e 3b 0d 09 0d 09 53 | 74 61 74 75 73 57 69 6e |rn;....S|tatusWin|
|00002380| 64 6f 77 28 22 45 73 74 | 61 62 6c 69 73 68 69 6e |dow("Est|ablishin|
|00002390| 67 20 46 54 50 20 43 6f | 6e 6e 65 63 74 69 6f 6e |g FTP Co|nnection|
|000023a0| 2e 2e 2e 22 2c 2d 31 29 | 3b 0d 09 0d 09 69 66 20 |...",-1)|;....if |
|000023b0| 28 46 54 50 43 6f 6e 6e | 65 63 74 28 26 63 6f 6e |(FTPConn|ect(&con|
|000023c0| 6e 49 44 2c 28 63 68 61 | 72 20 2a 29 67 50 72 65 |nID,(cha|r *)gPre|
|000023d0| 66 73 2e 68 6f 73 74 2c | 28 63 68 61 72 20 2a 29 |fs.host,|(char *)|
|000023e0| 67 50 72 65 66 73 2e 6e | 61 6d 65 2c 67 50 61 73 |gPrefs.n|ame,gPas|
|000023f0| 73 29 21 3d 6e 6f 45 72 | 72 29 20 7b 0d 09 09 46 |s)!=noEr|r) {...F|
|00002400| 54 50 44 69 73 63 6f 6e | 6e 65 63 74 28 63 6f 6e |TPDiscon|nect(con|
|00002410| 6e 49 44 29 3b 0d 09 09 | 43 6c 6f 73 65 53 74 61 |nID);...|CloseSta|
|00002420| 74 75 73 57 69 6e 64 6f | 77 28 29 3b 0d 09 09 50 |tusWindo|w();...P|
|00002430| 61 72 61 6d 54 65 78 74 | 28 22 5c 70 46 69 6c 65 |aramText|("\pFile|
|00002440| 20 6e 6f 74 20 72 65 74 | 72 69 65 76 65 64 20 73 | not ret|rieved s|
|00002450| 75 63 63 65 73 73 66 75 | 6c 6c 79 2e 22 2c 22 5c |uccessfu|lly.","\|
|00002460| 70 22 2c 22 5c 70 22 2c | 22 5c 70 22 29 3b 0d 09 |p","\p",|"\p");..|
|00002470| 09 4e 6f 74 65 41 6c 65 | 72 74 28 6b 45 72 72 44 |.NoteAle|rt(kErrD|
|00002480| 6c 67 2c 6e 69 6c 29 3b | 0d 09 09 72 65 74 75 72 |lg,nil);|...retur|
|00002490| 6e 3b 0d 09 7d 0d 09 0d | 09 69 66 20 28 28 65 72 |n;..}...|.if ((er|
|000024a0| 72 20 3d 20 46 54 50 56 | 69 65 77 46 69 6c 65 28 |r = FTPV|iewFile(|
|000024b0| 63 6f 6e 6e 49 44 2c 26 | 6e 65 77 73 44 61 74 61 |connID,&|newsData|
|000024c0| 2c 22 2e 6e 65 77 73 72 | 63 22 29 29 21 3d 6e 6f |,".newsr|c"))!=no|
|000024d0| 45 72 72 29 20 7b 0d 09 | 09 46 54 50 44 69 73 63 |Err) {..|.FTPDisc|
|000024e0| 6f 6e 6e 65 63 74 28 63 | 6f 6e 6e 49 44 29 3b 0d |onnect(c|onnID);.|
|000024f0| 09 09 43 6c 6f 73 65 53 | 74 61 74 75 73 57 69 6e |..CloseS|tatusWin|
|00002500| 64 6f 77 28 29 3b 0d 09 | 09 53 65 74 43 75 72 73 |dow();..|.SetCurs|
|00002510| 6f 72 28 26 51 44 41 52 | 52 4f 57 29 3b 0d 09 09 |or(&QDAR|ROW);...|
|00002520| 50 61 72 61 6d 54 65 78 | 74 28 22 5c 70 46 69 6c |ParamTex|t("\pFil|
|00002530| 65 20 6e 6f 74 20 72 65 | 74 72 69 65 76 65 64 20 |e not re|trieved |
|00002540| 73 75 63 63 65 73 73 66 | 75 6c 6c 79 2e 22 2c 22 |successf|ully.","|
|00002550| 5c 70 22 2c 22 5c 70 22 | 2c 22 5c 70 22 29 3b 0d |\p","\p"|,"\p");.|
|00002560| 09 09 4e 6f 74 65 41 6c | 65 72 74 28 6b 45 72 72 |..NoteAl|ert(kErr|
|00002570| 44 6c 67 2c 6e 69 6c 29 | 3b 0d 09 09 72 65 74 75 |Dlg,nil)|;...retu|
|00002580| 72 6e 3b 0d 09 7d 0d 09 | 43 6c 6f 73 65 53 74 61 |rn;..}..|CloseSta|
|00002590| 74 75 73 57 69 6e 64 6f | 77 28 29 3b 0d 0d 09 46 |tusWindo|w();...F|
|000025a0| 54 50 44 69 73 63 6f 6e | 6e 65 63 74 28 63 6f 6e |TPDiscon|nect(con|
|000025b0| 6e 49 44 29 3b 0d 09 0d | 09 4e 65 77 47 72 6f 75 |nID);...|.NewGrou|
|000025c0| 70 57 69 6e 64 6f 77 28 | 22 5c 70 6e 65 77 73 72 |pWindow(|"\pnewsr|
|000025d0| 63 22 29 3b 0d 09 69 6e | 66 6f 20 3d 20 28 54 77 |c");..in|fo = (Tw|
|000025e0| 69 6e 64 6f 77 49 6e 66 | 6f 20 2a 29 47 65 74 57 |indowInf|o *)GetW|
|000025f0| 52 65 66 43 6f 6e 28 77 | 69 6e 64 6f 77 20 3d 20 |RefCon(w|indow = |
|00002600| 46 72 6f 6e 74 57 69 6e | 64 6f 77 28 29 29 3b 0d |FrontWin|dow());.|
|00002610| 09 0d 09 42 6c 6f 63 6b | 4d 6f 76 65 28 22 5c 70 |...Block|Move("\p|
|00002620| 6e 65 77 73 72 63 22 2c | 69 6e 66 6f 2d 3e 64 69 |newsrc",|info->di|
|00002630| 73 6b 46 69 6c 65 2c 38 | 29 3b 0d 09 69 6e 66 6f |skFile,8|);..info|
|00002640| 2d 3e 64 69 73 6b 56 52 | 65 66 4e 75 6d 20 3d 20 |->diskVR|efNum = |
|00002650| 30 3b 0d 09 4c 44 6f 44 | 72 61 77 28 66 61 6c 73 |0;..LDoD|raw(fals|
|00002660| 65 2c 28 4c 69 73 74 48 | 61 6e 64 6c 65 29 69 6e |e,(ListH|andle)in|
|00002670| 66 6f 2d 3e 64 61 74 61 | 29 3b 0d 09 63 75 72 72 |fo->data|);..curr|
|00002680| 65 6e 74 20 3d 20 6e 65 | 77 73 44 61 74 61 3b 0d |ent = ne|wsData;.|
|00002690| 09 77 68 69 6c 65 20 28 | 2a 63 75 72 72 65 6e 74 |.while (|*current|
|000026a0| 29 0d 09 09 50 72 6f 63 | 65 73 73 4c 69 6e 65 28 |)...Proc|essLine(|
|000026b0| 26 63 75 72 72 65 6e 74 | 2c 77 69 6e 64 6f 77 29 |&current|,window)|
|000026c0| 3b 0d 09 4c 44 6f 44 72 | 61 77 28 74 72 75 65 2c |;..LDoDr|aw(true,|
|000026d0| 28 4c 69 73 74 48 61 6e | 64 6c 65 29 69 6e 66 6f |(ListHan|dle)info|
|000026e0| 2d 3e 64 61 74 61 29 3b | 0d 09 69 6e 66 6f 2d 3e |->data);|..info->|
|000026f0| 63 68 61 6e 67 65 64 20 | 3d 20 66 61 6c 73 65 3b |changed |= false;|
|00002700| 0d 09 69 6e 66 6f 2d 3e | 73 61 76 65 64 20 3d 20 |..info->|saved = |
|00002710| 66 61 6c 73 65 3b 0d 09 | 0d 09 69 66 20 28 67 50 |false;..|..if (gP|
|00002720| 72 65 66 73 2e 6f 70 65 | 6e 57 69 6e 64 6f 77 73 |refs.ope|nWindows|
|00002730| 5a 6f 6f 6d 65 64 29 0d | 09 09 54 6f 67 67 6c 65 |Zoomed).|..Toggle|
|00002740| 5a 6f 6f 6d 28 77 69 6e | 64 6f 77 29 3b 0d 09 53 |Zoom(win|dow);..S|
|00002750| 68 6f 77 57 69 6e 64 6f | 77 28 77 69 6e 64 6f 77 |howWindo|w(window|
|00002760| 29 3b 0d 09 53 65 74 50 | 6f 72 74 28 77 69 6e 64 |);..SetP|ort(wind|
|00002770| 6f 77 29 3b 0d 09 49 6e | 76 61 6c 52 65 63 74 28 |ow);..In|valRect(|
|00002780| 26 77 69 6e 64 6f 77 2d | 3e 70 6f 72 74 52 65 63 |&window-|>portRec|
|00002790| 74 29 3b 0d 09 4d 79 44 | 69 73 70 6f 73 50 74 72 |t);..MyD|isposPtr|
|000027a0| 28 6e 65 77 73 44 61 74 | 61 29 3b 0d 7d 0d 0d 0d |(newsDat|a);.}...|
|000027b0| 2f 2a 09 53 65 6e 64 54 | 6f 4e 65 74 20 73 65 6e |/*.SendT|oNet sen|
|000027c0| 64 73 20 61 20 75 73 65 | 72 20 67 72 6f 75 70 20 |ds a use|r group |
|000027d0| 6c 69 73 74 20 74 6f 20 | 61 20 75 73 65 72 27 73 |list to |a user's|
|000027e0| 20 72 65 6d 6f 74 65 20 | 61 63 63 6f 75 6e 74 20 | remote |account |
|000027f0| 66 6f 72 20 73 74 6f 72 | 61 67 65 0d 09 61 73 20 |for stor|age..as |
|00002800| 61 20 6e 65 77 73 72 63 | 20 66 69 6c 65 2e 0d 2a |a newsrc| file..*|
|00002810| 2f 0d 0d 76 6f 69 64 20 | 53 65 6e 64 54 6f 4e 65 |/..void |SendToNe|
|00002820| 74 28 76 6f 69 64 29 0d | 7b 0d 09 65 78 74 65 72 |t(void).|{..exter|
|00002830| 6e 20 63 68 61 72 20 67 | 50 61 73 73 5b 5d 3b 0d |n char g|Pass[];.|
|00002840| 09 65 78 74 65 72 6e 20 | 54 50 72 65 66 52 65 63 |.extern |TPrefRec|
|00002850| 20 67 50 72 65 66 73 3b | 0d 09 63 68 61 72 20 74 | gPrefs;|..char t|
|00002860| 6d 70 53 74 72 5b 32 35 | 36 5d 3b 0d 09 63 68 61 |mpStr[25|6];..cha|
|00002870| 72 20 2a 6e 65 77 73 44 | 61 74 61 3b 0d 09 6c 6f |r *newsD|ata;..lo|
|00002880| 6e 67 20 6e 65 77 73 44 | 61 74 61 4c 65 6e 3b 0d |ng newsD|ataLen;.|
|00002890| 09 6c 6f 6e 67 20 66 69 | 72 73 74 3b 0d 09 73 68 |.long fi|rst;..sh|
|000028a0| 6f 72 74 20 6f 66 66 73 | 65 74 3b 0d 09 54 57 4c |ort offs|et;..TWL|
|000028b0| 69 73 74 20 2a 63 75 72 | 72 65 6e 74 3b 0d 09 54 |ist *cur|rent;..T|
|000028c0| 47 72 6f 75 70 20 2a 74 | 68 65 47 72 6f 75 70 3b |Group *t|heGroup;|
|000028d0| 0d 09 54 52 65 61 64 52 | 65 63 20 2a 72 65 61 64 |..TReadR|ec *read|
|000028e0| 3b 0d 09 54 77 69 6e 64 | 6f 77 49 6e 66 6f 20 2a |;..Twind|owInfo *|
|000028f0| 69 6e 66 6f 3b 0d 09 57 | 69 6e 64 6f 77 50 74 72 |info;..W|indowPtr|
|00002900| 20 77 69 6e 64 6f 77 3b | 0d 09 75 6e 73 69 67 6e | window;|..unsign|
|00002910| 65 64 20 6c 6f 6e 67 20 | 63 6f 6e 6e 49 44 3b 0d |ed long |connID;.|
|00002920| 09 0d 09 77 69 6e 64 6f | 77 20 3d 20 46 72 6f 6e |...windo|w = Fron|
|00002930| 74 57 69 6e 64 6f 77 28 | 29 3b 0d 09 69 66 20 28 |tWindow(|);..if (|
|00002940| 21 77 69 6e 64 6f 77 20 | 7c 7c 20 21 49 73 41 70 |!window ||| !IsAp|
|00002950| 70 57 69 6e 64 6f 77 28 | 77 69 6e 64 6f 77 29 29 |pWindow(|window))|
|00002960| 0d 09 09 72 65 74 75 72 | 6e 3b 0d 09 69 6e 66 6f |...retur|n;..info|
|00002970| 20 3d 20 28 54 77 69 6e | 64 6f 77 49 6e 66 6f 20 | = (Twin|dowInfo |
|00002980| 2a 29 47 65 74 57 52 65 | 66 43 6f 6e 28 77 69 6e |*)GetWRe|fCon(win|
|00002990| 64 6f 77 29 3b 0d 09 69 | 66 20 28 69 6e 66 6f 2d |dow);..i|f (info-|
|000029a0| 3e 6b 69 6e 64 20 21 3d | 20 63 55 73 65 72 47 72 |>kind !=| cUserGr|
|000029b0| 6f 75 70 29 0d 09 09 72 | 65 74 75 72 6e 3b 0d 09 |oup)...r|eturn;..|
|000029c0| 09 0d 09 69 66 20 28 21 | 41 75 74 68 65 6e 74 69 |...if (!|Authenti|
|000029d0| 63 61 74 65 28 29 29 0d | 09 09 72 65 74 75 72 6e |cate()).|..return|
|000029e0| 3b 0d 09 0d 09 53 74 61 | 74 75 73 57 69 6e 64 6f |;....Sta|tusWindo|
|000029f0| 77 28 22 43 6f 6e 76 65 | 72 74 69 6e 67 20 74 6f |w("Conve|rting to|
|00002a00| 20 6e 65 77 73 72 63 20 | 66 6f 72 6d 61 74 2e 2e | newsrc |format..|
|00002a10| 2e 22 2c 2d 31 29 3b 0d | 09 47 69 76 65 54 69 6d |.",-1);.|.GiveTim|
|00002a20| 65 28 30 29 3b 0d 09 0d | 09 6e 65 77 73 44 61 74 |e(0);...|.newsDat|
|00002a30| 61 20 3d 20 28 63 68 61 | 72 20 2a 29 4d 79 4e 65 |a = (cha|r *)MyNe|
|00002a40| 77 50 74 72 28 6b 4d 61 | 78 47 72 6f 75 70 4c 65 |wPtr(kMa|xGroupLe|
|00002a50| 6e 29 3b 0d 09 69 66 20 | 28 4d 79 4d 65 6d 45 72 |n);..if |(MyMemEr|
|00002a60| 72 28 29 20 21 3d 20 6e | 6f 45 72 72 29 0d 09 09 |r() != n|oErr)...|
|00002a70| 72 65 74 75 72 6e 3b 0d | 09 09 0d 09 6e 65 77 73 |return;.|....news|
|00002a80| 44 61 74 61 4c 65 6e 20 | 3d 20 30 3b 0d 09 6e 65 |DataLen |= 0;..ne|
|00002a90| 77 73 44 61 74 61 5b 6e | 65 77 73 44 61 74 61 4c |wsData[n|ewsDataL|
|00002aa0| 65 6e 5d 20 3d 20 27 5c | 30 27 3b 0d 09 0d 09 2f |en] = '\|0';..../|
|00002ab0| 2a 20 75 70 64 61 74 65 | 20 72 65 61 64 20 6c 69 |* update| read li|
|00002ac0| 73 74 73 20 2a 2f 0d 09 | 0d 09 66 6f 72 20 28 63 |sts */..|..for (c|
|00002ad0| 75 72 72 65 6e 74 20 3d | 20 69 6e 66 6f 2d 3e 63 |urrent =| info->c|
|00002ae0| 68 69 6c 64 4c 69 73 74 | 3b 20 63 75 72 72 65 6e |hildList|; curren|
|00002af0| 74 20 21 3d 20 6e 69 6c | 3b 20 63 75 72 72 65 6e |t != nil|; curren|
|00002b00| 74 20 3d 20 63 75 72 72 | 65 6e 74 2d 3e 6e 65 78 |t = curr|ent->nex|
|00002b10| 74 29 0d 09 09 4d 61 72 | 6b 52 65 61 64 4d 73 67 |t)...Mar|kReadMsg|
|00002b20| 73 28 28 54 77 69 6e 64 | 6f 77 49 6e 66 6f 20 2a |s((Twind|owInfo *|
|00002b30| 29 20 47 65 74 57 52 65 | 66 43 6f 6e 28 63 75 72 |) GetWRe|fCon(cur|
|00002b40| 72 65 6e 74 2d 3e 63 68 | 69 6c 64 57 69 6e 64 6f |rent->ch|ildWindo|
|00002b50| 77 29 29 3b 0d 09 0d 09 | 2f 2a 20 70 72 6f 63 65 |w));....|/* proce|
|00002b60| 73 73 20 67 72 6f 75 70 | 73 20 2a 2f 0d 09 0d 09 |ss group|s */....|
|00002b70| 66 6f 72 20 28 74 68 65 | 47 72 6f 75 70 20 3d 20 |for (the|Group = |
|00002b80| 28 54 47 72 6f 75 70 20 | 2a 29 69 6e 66 6f 2d 3e |(TGroup |*)info->|
|00002b90| 64 61 74 61 32 3b 20 74 | 68 65 47 72 6f 75 70 21 |data2; t|heGroup!|
|00002ba0| 3d 6e 69 6c 3b 20 74 68 | 65 47 72 6f 75 70 3d 74 |=nil; th|eGroup=t|
|00002bb0| 68 65 47 72 6f 75 70 2d | 3e 6e 65 78 74 29 20 7b |heGroup-|>next) {|
|00002bc0| 0d 09 09 73 74 72 63 61 | 74 28 6e 65 77 73 44 61 |...strca|t(newsDa|
|00002bd0| 74 61 2c 74 68 65 47 72 | 6f 75 70 2d 3e 6e 61 6d |ta,theGr|oup->nam|
|00002be0| 65 29 3b 0d 09 09 73 74 | 72 63 61 74 28 6e 65 77 |e);...st|rcat(new|
|00002bf0| 73 44 61 74 61 2c 22 3a | 20 22 29 3b 0d 09 09 0d |sData,":| ");....|
|00002c00| 09 09 66 69 72 73 74 20 | 3d 20 31 3b 0d 09 09 66 |..first |= 1;...f|
|00002c10| 6f 72 20 28 72 65 61 64 | 20 3d 20 74 68 65 47 72 |or (read| = theGr|
|00002c20| 6f 75 70 2d 3e 72 65 61 | 64 3b 20 72 65 61 64 21 |oup->rea|d; read!|
|00002c30| 3d 6e 69 6c 3b 20 72 65 | 61 64 20 3d 20 72 65 61 |=nil; re|ad = rea|
|00002c40| 64 2d 3e 6e 65 78 74 29 | 20 7b 0d 09 09 09 69 66 |d->next)| {....if|
|00002c50| 20 28 20 28 72 65 61 64 | 2d 3e 66 69 72 73 74 52 | ( (read|->firstR|
|00002c60| 65 61 64 2d 31 20 2d 20 | 66 69 72 73 74 29 20 3e |ead-1 - |first) >|
|00002c70| 3d 20 30 29 20 7b 0d 09 | 09 09 09 73 70 72 69 6e |= 0) {..|...sprin|
|00002c80| 74 66 28 74 6d 70 53 74 | 72 2c 22 25 6c 75 2d 25 |tf(tmpSt|r,"%lu-%|
|00002c90| 6c 75 22 2c 66 69 72 73 | 74 2c 28 72 65 61 64 2d |lu",firs|t,(read-|
|00002ca0| 3e 66 69 72 73 74 52 65 | 61 64 2d 31 29 29 3b 0d |>firstRe|ad-1));.|
|00002cb0| 09 09 09 09 69 66 20 28 | 72 65 61 64 2d 3e 6e 65 |....if (|read->ne|
|00002cc0| 78 74 29 0d 09 09 09 09 | 09 73 74 72 63 61 74 28 |xt).....|.strcat(|
|00002cd0| 74 6d 70 53 74 72 2c 22 | 2c 22 29 3b 0d 09 09 09 |tmpStr,"|,");....|
|00002ce0| 09 73 74 72 63 61 74 28 | 6e 65 77 73 44 61 74 61 |.strcat(|newsData|
|00002cf0| 2c 74 6d 70 53 74 72 29 | 3b 0d 09 09 09 7d 0d 09 |,tmpStr)|;....}..|
|00002d00| 09 09 66 69 72 73 74 20 | 3d 20 31 20 2b 20 72 65 |..first |= 1 + re|
|00002d10| 61 64 2d 3e 6c 61 73 74 | 52 65 61 64 3b 0d 09 09 |ad->last|Read;...|
|00002d20| 7d 0d 09 09 0d 09 09 2f | 2a 20 6d 61 72 6b 20 72 |}....../|* mark r|
|00002d30| 65 61 64 20 74 6f 20 6c | 61 73 74 20 6d 65 73 73 |ead to l|ast mess|
|00002d40| 61 67 65 20 6f 66 20 67 | 72 6f 75 70 20 2a 2f 0d |age of g|roup */.|
|00002d50| 09 0d 09 09 69 66 20 28 | 74 68 65 47 72 6f 75 70 |....if (|theGroup|
|00002d60| 2d 3e 6c 61 73 74 4d 65 | 73 73 20 3e 3d 20 66 69 |->lastMe|ss >= fi|
|00002d70| 72 73 74 29 20 7b 0d 09 | 09 09 09 73 70 72 69 6e |rst) {..|...sprin|
|00002d80| 74 66 28 74 6d 70 53 74 | 72 2c 22 2c 20 25 6c 75 |tf(tmpSt|r,", %lu|
|00002d90| 2d 25 6c 75 22 2c 66 69 | 72 73 74 2c 74 68 65 47 |-%lu",fi|rst,theG|
|00002da0| 72 6f 75 70 2d 3e 6c 61 | 73 74 4d 65 73 73 29 3b |roup->la|stMess);|
|00002db0| 0d 09 09 09 09 69 66 20 | 28 66 69 72 73 74 3d 3d |.....if |(first==|
|00002dc0| 31 29 0d 09 09 09 09 09 | 6f 66 66 73 65 74 3d 31 |1)......|offset=1|
|00002dd0| 3b 0d 09 09 09 09 65 6c | 73 65 0d 09 09 09 09 09 |;.....el|se......|
|00002de0| 6f 66 66 73 65 74 3d 30 | 3b 0d 09 09 09 09 73 74 |offset=0|;.....st|
|00002df0| 72 63 61 74 28 6e 65 77 | 73 44 61 74 61 2c 74 6d |rcat(new|sData,tm|
|00002e00| 70 53 74 72 2b 6f 66 66 | 73 65 74 29 3b 0d 09 09 |pStr+off|set);...|
|00002e10| 7d 0d 09 09 0d 09 09 73 | 74 72 63 61 74 28 6e 65 |}......s|trcat(ne|
|00002e20| 77 73 44 61 74 61 2c 43 | 52 53 54 52 29 3b 0d 09 |wsData,C|RSTR);..|
|00002e30| 7d 0d 0d 09 53 74 61 74 | 75 73 57 69 6e 64 6f 77 |}...Stat|usWindow|
|00002e40| 28 22 45 73 74 61 62 6c | 69 73 68 69 6e 67 20 46 |("Establ|ishing F|
|00002e50| 54 50 20 43 6f 6e 6e 65 | 63 74 69 6f 6e 2e 2e 2e |TP Conne|ction...|
|00002e60| 22 2c 2d 31 29 3b 0d 09 | 47 69 76 65 54 69 6d 65 |",-1);..|GiveTime|
|00002e70| 28 30 29 3b 0d 09 0d 09 | 69 66 20 28 46 54 50 43 |(0);....|if (FTPC|
|00002e80| 6f 6e 6e 65 63 74 28 26 | 63 6f 6e 6e 49 44 2c 28 |onnect(&|connID,(|
|00002e90| 63 68 61 72 20 2a 29 67 | 50 72 65 66 73 2e 68 6f |char *)g|Prefs.ho|
|00002ea0| 73 74 2c 28 63 68 61 72 | 20 2a 29 67 50 72 65 66 |st,(char| *)gPref|
|00002eb0| 73 2e 6e 61 6d 65 2c 67 | 50 61 73 73 29 21 3d 6e |s.name,g|Pass)!=n|
|00002ec0| 6f 45 72 72 29 20 7b 0d | 09 09 46 54 50 44 69 73 |oErr) {.|..FTPDis|
|00002ed0| 63 6f 6e 6e 65 63 74 28 | 63 6f 6e 6e 49 44 29 3b |connect(|connID);|
|00002ee0| 0d 09 09 43 6c 6f 73 65 | 53 74 61 74 75 73 57 69 |...Close|StatusWi|
|00002ef0| 6e 64 6f 77 28 29 3b 0d | 09 09 50 61 72 61 6d 54 |ndow();.|..ParamT|
|00002f00| 65 78 74 28 22 5c 70 46 | 69 6c 65 20 6e 6f 74 20 |ext("\pF|ile not |
|00002f10| 73 65 6e 74 20 73 75 63 | 63 65 73 73 66 75 6c 6c |sent suc|cessfull|
|00002f20| 79 2e 22 2c 22 5c 70 22 | 2c 22 5c 70 22 2c 22 5c |y.","\p"|,"\p","\|
|00002f30| 70 22 29 3b 0d 09 09 4e | 6f 74 65 41 6c 65 72 74 |p");...N|oteAlert|
|00002f40| 28 6b 45 72 72 44 6c 67 | 2c 6e 69 6c 29 3b 0d 09 |(kErrDlg|,nil);..|
|00002f50| 09 72 65 74 75 72 6e 3b | 0d 09 7d 0d 09 0d 09 69 |.return;|..}....i|
|00002f60| 66 20 28 46 54 50 50 75 | 74 46 69 6c 65 28 63 6f |f (FTPPu|tFile(co|
|00002f70| 6e 6e 49 44 2c 22 2e 6e | 65 77 73 72 63 22 2c 6e |nnID,".n|ewsrc",n|
|00002f80| 65 77 73 44 61 74 61 2c | 73 74 72 6c 65 6e 28 6e |ewsData,|strlen(n|
|00002f90| 65 77 73 44 61 74 61 29 | 29 21 3d 6e 6f 45 72 72 |ewsData)|)!=noErr|
|00002fa0| 29 20 7b 0d 09 09 43 6c | 6f 73 65 53 74 61 74 75 |) {...Cl|oseStatu|
|00002fb0| 73 57 69 6e 64 6f 77 28 | 29 3b 0d 09 09 50 61 72 |sWindow(|);...Par|
|00002fc0| 61 6d 54 65 78 74 28 22 | 5c 70 46 69 6c 65 20 6e |amText("|\pFile n|
|00002fd0| 6f 74 20 73 65 6e 74 20 | 73 75 63 63 65 73 73 66 |ot sent |successf|
|00002fe0| 75 6c 6c 79 2e 22 2c 22 | 5c 70 22 2c 22 5c 70 22 |ully.","|\p","\p"|
|00002ff0| 2c 22 5c 70 22 29 3b 0d | 09 09 4e 6f 74 65 41 6c |,"\p");.|..NoteAl|
|00003000| 65 72 74 28 6b 45 72 72 | 44 6c 67 2c 6e 69 6c 29 |ert(kErr|Dlg,nil)|
|00003010| 3b 0d 09 7d 0d 0d 09 46 | 54 50 44 69 73 63 6f 6e |;..}...F|TPDiscon|
|00003020| 6e 65 63 74 28 63 6f 6e | 6e 49 44 29 3b 0d 0d 09 |nect(con|nID);...|
|00003030| 2f 2a 20 6e 65 77 73 64 | 61 74 61 20 68 61 73 20 |/* newsd|ata has |
|00003040| 61 6c 72 65 61 64 79 20 | 62 65 65 6e 20 64 69 73 |already |been dis|
|00003050| 70 6f 73 65 64 20 2a 2f | 0d 7d 0d 0d 0d 2f 2a 09 |posed */|.}.../*.|
|00003060| 44 6f 53 65 6e 64 4d 73 | 67 20 65 69 74 68 65 72 |DoSendMs|g either|
|00003070| 20 70 6f 73 74 73 20 61 | 20 6d 65 73 73 61 67 65 | posts a| message|
|00003080| 20 6f 72 20 73 65 6e 64 | 73 20 74 68 65 20 6d 65 | or send|s the me|
|00003090| 73 73 61 67 65 20 74 68 | 72 6f 75 67 68 0d 09 65 |ssage th|rough..e|
|000030a0| 6c 65 63 74 72 6f 6e 69 | 63 20 6d 61 69 6c 20 28 |lectroni|c mail (|
|000030b0| 53 4d 54 50 29 20 61 66 | 74 65 72 20 63 6f 6e 76 |SMTP) af|ter conv|
|000030c0| 65 72 74 69 6e 67 20 74 | 68 65 20 61 70 70 72 6f |erting t|he appro|
|000030d0| 70 72 69 61 74 65 20 68 | 65 61 64 65 72 0d 09 66 |priate h|eader..f|
|000030e0| 69 65 6c 64 73 2c 20 65 | 74 63 2e 2e 2e 0d 2a 2f |ields, e|tc....*/|
|000030f0| 0d 0d 42 6f 6f 6c 65 61 | 6e 20 44 6f 53 65 6e 64 |..Boolea|n DoSend|
|00003100| 4d 73 67 28 54 77 69 6e | 64 6f 77 49 6e 66 6f 20 |Msg(Twin|dowInfo |
|00003110| 2a 69 6e 66 6f 29 0d 7b | 0d 09 48 61 6e 64 6c 65 |*info).{|..Handle|
|00003120| 20 73 65 6e 64 54 65 78 | 74 3b 0d 09 75 6e 73 69 | sendTex|t;..unsi|
|00003130| 67 6e 65 64 20 73 68 6f | 72 74 20 6c 65 6e 67 74 |gned sho|rt lengt|
|00003140| 68 3b 0d 09 42 6f 6f 6c | 65 61 6e 20 72 65 73 75 |h;..Bool|ean resu|
|00003150| 6c 74 20 3d 20 66 61 6c | 73 65 3b 0d 09 6c 6f 6e |lt = fal|se;..lon|
|00003160| 67 20 6f 66 66 73 65 74 | 3b 0d 09 63 68 61 72 20 |g offset|;..char |
|00003170| 6d 75 6e 67 65 54 65 78 | 74 31 5b 32 35 36 5d 3b |mungeTex|t1[256];|
|00003180| 0d 09 63 68 61 72 20 6d | 75 6e 67 65 54 65 78 74 |..char m|ungeText|
|00003190| 32 5b 32 35 36 5d 3b 0d | 09 63 68 61 72 20 6d 75 |2[256];.|.char mu|
|000031a0| 6e 67 65 54 65 78 74 33 | 5b 32 35 36 5d 3b 0d 09 |ngeText3|[256];..|
|000031b0| 0d 09 73 74 72 63 70 79 | 28 6d 75 6e 67 65 54 65 |..strcpy|(mungeTe|
|000031c0| 78 74 31 2c 43 52 53 54 | 52 29 3b 0d 09 73 74 72 |xt1,CRST|R);..str|
|000031d0| 63 61 74 28 6d 75 6e 67 | 65 54 65 78 74 31 2c 43 |cat(mung|eText1,C|
|000031e0| 52 53 54 52 29 3b 0d 0d | 09 73 74 72 63 70 79 28 |RSTR);..|.strcpy(|
|000031f0| 6d 75 6e 67 65 54 65 78 | 74 32 2c 43 52 53 54 52 |mungeTex|t2,CRSTR|
|00003200| 29 3b 0d 09 73 74 72 63 | 61 74 28 6d 75 6e 67 65 |);..strc|at(munge|
|00003210| 54 65 78 74 32 2c 22 46 | 72 6f 6d 22 29 3b 0d 0d |Text2,"F|rom");..|
|00003220| 09 73 74 72 63 70 79 28 | 6d 75 6e 67 65 54 65 78 |.strcpy(|mungeTex|
|00003230| 74 33 2c 43 52 53 54 52 | 29 3b 0d 09 73 74 72 63 |t3,CRSTR|);..strc|
|00003240| 61 74 28 6d 75 6e 67 65 | 54 65 78 74 33 2c 22 3e |at(munge|Text3,">|
|00003250| 46 72 6f 6d 22 29 3b 0d | 09 0d 09 69 66 20 28 21 |From");.|...if (!|
|00003260| 43 68 65 63 6b 48 65 61 | 64 65 72 28 69 6e 66 6f |CheckHea|der(info|
|00003270| 29 29 20 7b 0d 09 09 50 | 61 72 61 6d 54 65 78 74 |)) {...P|aramText|
|00003280| 28 22 5c 70 49 6e 76 61 | 6c 69 64 20 73 65 6e 64 |("\pInva|lid send|
|00003290| 65 72 20 6e 61 6d 65 21 | 20 20 43 61 6e 27 74 20 |er name!| Can't |
|000032a0| 73 65 6e 64 20 6d 65 73 | 73 61 67 65 2e 22 2c 22 |send mes|sage.","|
|000032b0| 5c 70 22 2c 22 5c 70 22 | 2c 22 5c 70 22 29 3b 0d |\p","\p"|,"\p");.|
|000032c0| 09 09 53 74 6f 70 41 6c | 65 72 74 28 6b 45 72 72 |..StopAl|ert(kErr|
|000032d0| 44 6c 67 2c 6e 69 6c 29 | 3b 0d 09 09 72 65 74 75 |Dlg,nil)|;...retu|
|000032e0| 72 6e 20 66 61 6c 73 65 | 3b 0d 09 7d 0d 09 0d 09 |rn false|;..}....|
|000032f0| 53 74 61 74 75 73 57 69 | 6e 64 6f 77 28 22 53 65 |StatusWi|ndow("Se|
|00003300| 6e 64 69 6e 67 20 4d 65 | 73 73 61 67 65 2e 2e 2e |nding Me|ssage...|
|00003310| 22 2c 2d 31 29 3b 0d 09 | 47 69 76 65 54 69 6d 65 |",-1);..|GiveTime|
|00003320| 28 30 29 3b 0d 09 0d 09 | 73 65 6e 64 54 65 78 74 |(0);....|sendText|
|00003330| 20 3d 20 28 48 61 6e 64 | 6c 65 29 20 54 45 47 65 | = (Hand|le) TEGe|
|00003340| 74 54 65 78 74 28 28 54 | 45 48 61 6e 64 6c 65 29 |tText((T|EHandle)|
|00003350| 69 6e 66 6f 2d 3e 64 61 | 74 61 29 3b 0d 09 6c 65 |info->da|ta);..le|
|00003360| 6e 67 74 68 20 3d 20 28 | 2a 2a 28 28 54 45 48 61 |ngth = (|**((TEHa|
|00003370| 6e 64 6c 65 29 69 6e 66 | 6f 2d 3e 64 61 74 61 29 |ndle)inf|o->data)|
|00003380| 29 2e 74 65 4c 65 6e 67 | 74 68 3b 0d 09 69 66 20 |).teLeng|th;..if |
|00003390| 28 4d 79 48 61 6e 64 54 | 6f 48 61 6e 64 28 26 73 |(MyHandT|oHand(&s|
|000033a0| 65 6e 64 54 65 78 74 29 | 20 21 3d 20 6e 6f 45 72 |endText)| != noEr|
|000033b0| 72 29 0d 09 09 72 65 74 | 75 72 6e 20 66 61 6c 73 |r)...ret|urn fals|
|000033c0| 65 3b 0d 09 4d 79 53 65 | 74 48 61 6e 64 6c 65 53 |e;..MySe|tHandleS|
|000033d0| 69 7a 65 28 73 65 6e 64 | 54 65 78 74 2c 28 6c 6f |ize(send|Text,(lo|
|000033e0| 6e 67 29 6c 65 6e 67 74 | 68 29 3b 0d 09 69 66 20 |ng)lengt|h);..if |
|000033f0| 28 4d 79 4d 65 6d 45 72 | 72 28 29 20 21 3d 20 6e |(MyMemEr|r() != n|
|00003400| 6f 45 72 72 29 0d 09 09 | 72 65 74 75 72 6e 20 66 |oErr)...|return f|
|00003410| 61 6c 73 65 3b 0d 09 0d | 09 2f 2a 20 72 65 6d 6f |alse;...|./* remo|
|00003420| 76 65 20 61 6c 6c 20 22 | 46 72 6f 6d 22 73 20 61 |ve all "|From"s a|
|00003430| 74 20 73 74 61 72 74 20 | 6f 66 20 6c 69 6e 65 73 |t start |of lines|
|00003440| 20 2a 2f 0d 09 0d 09 66 | 6f 72 20 28 6f 66 66 73 | */....f|or (offs|
|00003450| 65 74 20 3d 20 4d 75 6e | 67 65 72 28 73 65 6e 64 |et = Mun|ger(send|
|00003460| 54 65 78 74 2c 30 4c 2c | 6d 75 6e 67 65 54 65 78 |Text,0L,|mungeTex|
|00003470| 74 31 2c 32 4c 2c 6e 69 | 6c 2c 30 4c 29 3b 0d 09 |t1,2L,ni|l,0L);..|
|00003480| 09 6f 66 66 73 65 74 3e | 3d 30 3b 0d 09 09 6f 66 |.offset>|=0;...of|
|00003490| 66 73 65 74 20 3d 20 4d | 75 6e 67 65 72 28 73 65 |fset = M|unger(se|
|000034a0| 6e 64 54 65 78 74 2c 6f | 66 66 73 65 74 2c 6d 75 |ndText,o|ffset,mu|
|000034b0| 6e 67 65 54 65 78 74 32 | 2c 35 4c 2c 6d 75 6e 67 |ngeText2|,5L,mung|
|000034c0| 65 54 65 78 74 33 2c 36 | 4c 29 29 0d 09 09 6c 65 |eText3,6|L))...le|
|000034d0| 6e 67 74 68 2b 2b 3b 0d | 09 0d 09 6c 65 6e 67 74 |ngth++;.|...lengt|
|000034e0| 68 2d 2d 3b 0d 09 0d 09 | 2f 2a 20 63 6f 6e 76 65 |h--;....|/* conve|
|000034f0| 72 74 20 61 6c 6c 20 22 | 2e 22 20 74 6f 20 22 2c |rt all "|." to ",|
|00003500| 22 20 61 74 20 73 74 61 | 72 74 20 6f 66 20 6c 69 |" at sta|rt of li|
|00003510| 6e 65 73 20 2a 2f 0d 09 | 0d 09 69 66 20 28 2a 2a |nes */..|..if (**|
|00003520| 73 65 6e 64 54 65 78 74 | 3d 3d 27 2e 27 29 0d 09 |sendText|=='.')..|
|00003530| 09 2a 2a 73 65 6e 64 54 | 65 78 74 20 3d 20 27 2c |.**sendT|ext = ',|
|00003540| 27 3b 0d 09 0d 09 73 74 | 72 63 70 79 28 6d 75 6e |';....st|rcpy(mun|
|00003550| 67 65 54 65 78 74 31 2c | 43 52 53 54 52 29 3b 0d |geText1,|CRSTR);.|
|00003560| 09 73 74 72 63 61 74 28 | 6d 75 6e 67 65 54 65 78 |.strcat(|mungeTex|
|00003570| 74 31 2c 22 2e 22 29 3b | 0d 09 73 74 72 63 61 74 |t1,".");|..strcat|
|00003580| 28 6d 75 6e 67 65 54 65 | 78 74 31 2c 43 52 53 54 |(mungeTe|xt1,CRST|
|00003590| 52 29 3b 0d 09 73 74 72 | 63 70 79 28 6d 75 6e 67 |R);..str|cpy(mung|
|000035a0| 65 54 65 78 74 32 2c 43 | 52 53 54 52 29 3b 0d 09 |eText2,C|RSTR);..|
|000035b0| 73 74 72 63 61 74 28 6d | 75 6e 67 65 54 65 78 74 |strcat(m|ungeText|
|000035c0| 32 2c 22 2c 22 29 3b 0d | 09 73 74 72 63 61 74 28 |2,",");.|.strcat(|
|000035d0| 6d 75 6e 67 65 54 65 78 | 74 32 2c 43 52 53 54 52 |mungeTex|t2,CRSTR|
|000035e0| 29 3b 0d 09 0d 09 66 6f | 72 20 28 6f 66 66 73 65 |);....fo|r (offse|
|000035f0| 74 20 3d 20 30 3b 20 6f | 66 66 73 65 74 3e 3d 30 |t = 0; o|ffset>=0|
|00003600| 3b 20 6f 66 66 73 65 74 | 20 3d 20 4d 75 6e 67 65 |; offset| = Munge|
|00003610| 72 28 73 65 6e 64 54 65 | 78 74 2c 6f 66 66 73 65 |r(sendTe|xt,offse|
|00003620| 74 2c 6d 75 6e 67 65 54 | 65 78 74 31 2c 33 4c 2c |t,mungeT|ext1,3L,|
|00003630| 6d 75 6e 67 65 54 65 78 | 74 32 2c 33 4c 29 29 0d |mungeTex|t2,3L)).|
|00003640| 09 09 3b 0d 09 09 0d 09 | 2f 2a 20 63 6f 6e 76 65 |..;.....|/* conve|
|00003650| 72 74 20 43 52 20 74 6f | 20 43 52 4c 46 20 2a 2f |rt CR to| CRLF */|
|00003660| 0d 09 0d 09 66 6f 72 20 | 28 6f 66 66 73 65 74 20 |....for |(offset |
|00003670| 3d 20 30 3b 20 6f 66 66 | 73 65 74 3e 3d 30 3b 20 |= 0; off|set>=0; |
|00003680| 6f 66 66 73 65 74 20 3d | 20 4d 75 6e 67 65 72 28 |offset =| Munger(|
|00003690| 73 65 6e 64 54 65 78 74 | 2c 6f 66 66 73 65 74 2c |sendText|,offset,|
|000036a0| 43 52 53 54 52 2c 31 4c | 2c 43 52 4c 46 2c 32 4c |CRSTR,1L|,CRLF,2L|
|000036b0| 29 29 0d 09 09 6c 65 6e | 67 74 68 2b 2b 3b 0d 09 |))...len|gth++;..|
|000036c0| 0d 09 6c 65 6e 67 74 68 | 2d 2d 3b 0d 0d 09 48 4c |..length|--;...HL|
|000036d0| 6f 63 6b 28 73 65 6e 64 | 54 65 78 74 29 3b 0d 09 |ock(send|Text);..|
|000036e0| 0d 09 2f 2a 20 73 65 6e | 64 20 6d 65 73 73 61 67 |../* sen|d messag|
|000036f0| 65 20 2a 2f 0d 09 0d 09 | 73 77 69 74 63 68 20 28 |e */....|switch (|
|00003700| 69 6e 66 6f 2d 3e 6b 69 | 6e 64 29 20 7b 0d 09 09 |info->ki|nd) {...|
|00003710| 63 61 73 65 20 63 53 65 | 6e 64 4d 65 73 73 61 67 |case cSe|ndMessag|
|00003720| 65 3a 0d 09 09 09 72 65 | 73 75 6c 74 20 3d 20 53 |e:....re|sult = S|
|00003730| 65 6e 64 53 4d 54 50 28 | 28 63 68 61 72 20 2a 29 |endSMTP(|(char *)|
|00003740| 2a 73 65 6e 64 54 65 78 | 74 2c 6c 65 6e 67 74 68 |*sendTex|t,length|
|00003750| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |);....br|eak;...c|
|00003760| 61 73 65 20 63 50 6f 73 | 74 4d 65 73 73 61 67 65 |ase cPos|tMessage|
|00003770| 3a 0d 09 09 09 72 65 73 | 75 6c 74 20 3d 20 53 65 |:....res|ult = Se|
|00003780| 6e 64 4e 4e 54 50 28 28 | 63 68 61 72 20 2a 29 2a |ndNNTP((|char *)*|
|00003790| 73 65 6e 64 54 65 78 74 | 2c 6c 65 6e 67 74 68 29 |sendText|,length)|
|000037a0| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 7d 0d 09 |;....bre|ak;..}..|
|000037b0| 4d 79 44 69 73 70 6f 73 | 48 61 6e 64 6c 65 28 73 |MyDispos|Handle(s|
|000037c0| 65 6e 64 54 65 78 74 29 | 3b 0d 09 0d 09 43 6c 6f |endText)|;....Clo|
|000037d0| 73 65 53 74 61 74 75 73 | 57 69 6e 64 6f 77 28 29 |seStatus|Window()|
|000037e0| 3b 0d 0d 09 69 66 20 28 | 72 65 73 75 6c 74 20 3d |;...if (|result =|
|000037f0| 3d 20 66 61 6c 73 65 29 | 20 7b 0d 09 09 50 61 72 |= false)| {...Par|
|00003800| 61 6d 54 65 78 74 28 22 | 5c 70 4d 65 73 73 61 67 |amText("|\pMessag|
|00003810| 65 20 6e 6f 74 20 73 65 | 6e 74 20 73 75 63 63 65 |e not se|nt succe|
|00003820| 73 73 66 75 6c 6c 79 2e | 22 2c 22 5c 70 22 2c 22 |ssfully.|","\p","|
|00003830| 5c 70 22 2c 22 5c 70 22 | 29 3b 0d 09 09 43 61 75 |\p","\p"|);...Cau|
|00003840| 74 69 6f 6e 41 6c 65 72 | 74 28 6b 45 72 72 44 6c |tionAler|t(kErrDl|
|00003850| 67 2c 6e 69 6c 29 3b 0d | 09 7d 0d 09 65 6c 73 65 |g,nil);.|.}..else|
|00003860| 0d 09 09 69 6e 66 6f 2d | 3e 63 68 61 6e 67 65 64 |...info-|>changed|
|00003870| 20 3d 20 66 61 6c 73 65 | 3b 0d 09 0d 09 72 65 74 | = false|;....ret|
|00003880| 75 72 6e 20 72 65 73 75 | 6c 74 3b 0d 7d 0d 0d 0d |urn resu|lt;.}...|
|00003890| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003900| 00 00 01 00 00 00 02 58 | 00 00 01 58 00 00 00 4a |.......X|...X...J|
|00003910| 6e 63 6c 75 64 65 20 3c | 41 6c 65 72 74 2e 68 3e |nclude <|Alert.h>|
|00003920| 0d 23 65 6e 64 69 66 0d | 0d 76 6f 69 64 20 43 68 |.#endif.|.void Ch|
|00003930| 0a 6e 65 74 73 74 75 66 | 66 2e 63 01 02 00 00 00 |.netstuf|f.c.....|
|00003940| 50 61 72 74 53 49 54 78 | 00 00 00 00 00 00 00 00 |PartSITx|........|
|00003950| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00003960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003970| 00 00 a9 8d 49 78 00 00 | 00 00 00 00 02 a2 74 68 |....Ix..|......th|
|00003980| 69 73 20 63 68 61 6e 67 | 65 20 74 6f 20 74 61 6b |is chang|e to tak|
|00003990| 65 20 65 66 66 65 63 74 | 2e 22 2c 22 5c 70 22 2c |e effect|.","\p",|
|000039a0| 22 5c 70 22 2c 22 5c 70 | 22 29 3b 0d 09 4e 6f 74 |"\p","\p|");..Not|
|000039b0| 65 41 6c 65 72 74 28 6b | 45 72 72 44 6c 67 2c 6e |eAlert(k|ErrDlg,n|
|000039c0| 69 6c 29 3b 0d 7d 76 65 | 72 20 41 64 64 72 65 73 |il);.}ve|r Addres|
|000039d0| 73 2e 2e 2e 00 00 00 00 | 00 00 00 00 0c 00 64 00 |s.......|......d.|
|000039e0| 78 00 dc 01 66 00 85 55 | 55 00 00 00 62 00 03 00 |x...f..U|U...b...|
|000039f0| 00 00 00 00 3a 00 19 00 | 4c 00 63 04 04 53 61 76 |....:...|L.c..Sav|
|00003a00| 00 00 00 1e 00 50 00 20 | 03 63 02 3d 00 50 00 20 |.....P. |.c.=.P. |
|00003a10| 03 63 02 3d 00 00 28 8f | 00 00 00 00 00 00 00 00 |.c.=..(.|........|
|00003a20| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|00003a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a40| 00 00 00 00 00 00 00 00 | 00 06 00 04 00 41 00 2d |........|.....A.-|
|00003a50| 01 ce 02 4a 00 41 00 2d | 01 ce 02 4a a3 ef 0d e7 |...J.A.-|...J....|
|00003a60| 00 00 00 1b 00 00 00 1b | 00 00 00 00 01 00 00 00 |........|........|
|00003a70| 00 e6 00 0b 00 00 05 e1 | 00 00 05 f4 13 43 68 61 |........|.....Cha|
|00003a80| 6e 67 65 53 65 72 76 65 | 72 41 64 64 72 65 73 73 |ngeServe|rAddress|
|00003a90| 00 00 0b 96 00 00 0b a6 | 11 47 65 74 43 6f 6e 66 |........|.GetConf|
|00003aa0| 69 67 75 72 61 74 69 6f | 6e 00 00 00 0f 25 00 00 |iguratio|n....%..|
|00003ab0| 0f 32 0d 44 4e 52 52 65 | 73 75 6c 74 50 72 6f 63 |.2.DNRRe|sultProc|
|00003ac0| 00 00 0f f5 00 00 0f fc | 07 43 76 74 41 64 64 72 |........|.CvtAddr|
|00003ad0| 00 00 12 e0 00 00 12 ee | 0f 50 61 73 73 77 6f 72 |........|.Passwor|
|00003ae0| 64 46 69 6c 74 65 72 00 | 00 00 18 d2 00 00 18 da |dFilter.|........|
|00003af0| 09 47 65 74 55 49 6e 66 | 6f 00 00 00 1d b5 00 00 |.GetUInf|o.......|
|00003b00| 1d c1 0d 41 75 74 68 65 | 6e 74 69 63 61 74 65 00 |...Authe|nticate.|
|00003b10| 00 00 20 38 00 00 20 3e | 07 4c 6f 67 6f 75 74 00 |.. 8.. >|.Logout.|
|00003b20| 00 00 21 20 00 00 21 2a | 0b 47 65 74 46 72 6f 6d |..! ..!*|.GetFrom|
|00003b30| 4e 65 74 00 00 00 26 9c | 00 00 26 a5 09 53 65 6e |Net...&.|..&..Sen|
|00003b40| 64 54 6f 4e 65 74 00 00 | 2f 6a 00 00 2f 73 09 44 |dToNet..|/j../s.D|
|00003b50| 6f 53 65 6e 64 4d 73 67 | 00 00 01 00 00 00 02 58 |oSendMsg|.......X|
|00003b60| 00 00 01 58 00 00 00 4a | 00 3f 1d b0 04 c8 00 00 |...X...J|.?......|
|00003b70| 00 1c 00 4a 00 00 4d 50 | 53 52 00 02 00 0a 03 f0 |...J..MP|SR......|
|00003b80| ff ff 00 00 00 00 00 00 | 00 00 03 ed ff ff 00 00 |........|........|
|00003b90| 00 22 00 00 00 00 03 ef | ff ff 00 00 00 6e 00 40 |."......|.....n.@|
|00003ba0| f1 fc 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+